Suppose you are working on a complex bash script to automate a series of tasks on your Linux system. You notice that as it grows, there are certain parts of the script where the same code blocks are ...
Docstrings are very useful for centralising documentation in one place, and helps to standarise the information that appears in READMEs, manpages and command-line help. Bash docstrings are a semantic ...
and only files matching my_test_here would make it onto do_something. I love the while-read pattern, but it just doesn't feel right that there's no simpler, built-in, idiomatic way to write a function ...
Bash functions, unlike functions in most programming languages do not allow you to return a value to the caller. When a bash function ends its return value is its status: zero for success, non-zero ...
Typically we interact with the Linux operating system through what is referred to as a shell interpreter. A common interpreter is the Bourne Again Shell, which people call by the catchy name of bash ...
Decimals to Roman numerals—here we hit all the limitations of Bash shell scripting. My last few articles have given me a chance to relive my undergraduate computer science degree and code a Roman ...
Complete shell script for password generator. The script is titled "passgen.sh". This shell script is intended to generate new passwords for new or existing accounts on a local, Linux system. The ...