glob match quoted pattern is literal single = also matches != pattern pattern from variable quoted variable is literal bracket pattern no field splitting empty string is false && || ! !! parentheses && binds tighter than || < and > compare strings string order, not numeric -lt is numeric operands of -eq are arithmetic -ge -ne -le -gt regex regex is unanchored quoted regex text is literal ... and matches itself regex from variable quoted ( is literal bad regex status=2 file tests missing file -ef -o option on -o option off -o unknown option is false -v set -v set to empty -v unset lone -f is a string -f as an operand no globbing of operands tilde expansion command substitution arithmetic expansion && short-circuits expansions: c=0 || short-circuits expansions: c=0 true=0 false=1 chained with && in if while: n=2 redirection after ]] < needs no spaces in a function false in a function newline before ]] newline after && errexit: tested errexit: status=1 from eval syntax [[: 2 syntax [[ a: 2 syntax [[ ]]: 2 syntax [[ a == ]]: 2 syntax [[ ( a ]]: 2 syntax [[ a b ]]: 2 syntax [[ a && ]]: 2 [[ and ]] are words elsewhere [status 0]