The case statement in the bash shell provides an interesting and easy alternative to the more complex if statements. They represent the simplest form of the kind of logic that evaluates multiple ...
The trap statement in bash causes your script to execute one or more commands when a signal is received. One of the useful things you can use this for is to clean up temporary files when your script ...
Although rarely used, the bash declare statement does have a couple useful options. It can mark a variable as read only and also mark it as being a number only. To declare a variable as read only, use ...
If you’ve never used bash case statements, you might be very surprised by how easily they allow you to simplify the logic of your scripts. Instead of composing a long group of code lines that would ...