A piggy bank of commands, fixes, succinct reviews, some mini articles and technical opinions from a (mostly) Perl developer.

Require a parameter/variable in bash

FILE=$1
if [[ -z "$FILE" ]]; then echo "usage: script_name.sh [filename]"; exit 1; fi

# don't forget the quotes around "$FILE", they will be required if $FILE has a space in it, and always use double [[ ]]