After going slowly crazy trying to remember how an if statement is formed in shell with its lovely and entirely useless help messages.
I've decided to post this:
if [ "$FULLHOSTNAME" = "loneqflocfd0025.uk.db.com" ]; then
if [[ "los" =~ lo.* ]]; then
echo 'Hello $fish'=== Hello $fish
echo "Hello $fish" === Hello haddock
Using dates and comparing current time with something that may have taken less than 2 seconds:
# Do something
if [ $start -gt $((now - 2)) ];
printf "Fast fail detected. I know about:\n"