If This, Then That: if and [[ ]]

if lets a script choose: the commands after then run only when a test passes, [[ ]] compares text with == and whole numbers with -lt and its friends, and if can also ask whether any command worked.

Updated

Cheat sheet for the lesson If This, Then That: if and [[ ]]: if lets a script choose: the commands after then run only when a test passes, [[ ]] compares text with == and whole numbers with -lt and its friends, and if can also ask whether any command worked.
Category
Bash
Level
Apprentice
Tags
exit-code, if-statement, linux, shell-script, test-command, unix