Bash latest code crumbs

Comparing values in Bash

Comparing values in Bash

Dec 14, 2021 by erik

The Bash test command can test for many things. The full list can be seen when you enter man test on the command line. Here's how you can compare two values to see if they are the same in bash....

Check arguments in your Bash script

Check arguments in your Bash script

Dec 14, 2021 by erik

With test -z we can check if a variable’s length is zero. If that is the case, we print some friendly usage instructions instead of failing miserably....

The bash ls command

The bash ls command

Dec 3, 2021 by erik

The ls command lists files in the given directory....