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

Bash arithmetic/command expansion

Command expansion, I use a lot
echo something $( date +%s )

Backticks also work for command expansion
echo something `date +%s`
...but do they work any differently to $( )?

Conditionals, like an if statement, use square brackets
if [ "$end_hour" = "24" ]; then ....; fi

Arithmetic, like 1 + 2, uses this:
i=$(( i + 1 ))
let i+=1
See http://www.softpanorama.org/Scripting/Shellorama/arithmetic_expressions.shtml