Default value in bash
# Set COFFEE to latte if there is no input
COFFEE=${1:-latte}
# Set SIZE to small when ORDER is not set or null
SIZE=${ORDER:-small}
# Set TOPPING and EXTRA to chocolate when EXTRA is not set or null
TOPPING=${EXTRA:=chocolate}
http://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html