${var} Value of var, same as $var
${var-DEFAULT} If var not set, evaluate expression as $DEFAULT *
${var:-DEFAULT} If var not set or is empty, evaluate expression as $DEFAULT *
${var=DEFAULT} If var not set, evaluate expression as $DEFAULT *
${var:=DEFAULT} If var not set, evaluate expression as $DEFAULT *
${var+OTHER} If var set, evaluate expression as $OTHER, otherwise as null string
${var:+OTHER} If var set, evaluate expression as $OTHER, otherwise as null string
${var?ERR_MSG} If var not set, print $ERR_MSG *
${var:?ERR_MSG} If var not set, print $ERR_MSG *
${!varprefix*} Matches all previously declared variables beginning with varprefix
${!varprefix@} Matches all previously declared variables beginning with varprefix
* Of course if var is set, evaluate the expression as $var. |