Variable defaults

Specifying defaults to use when a variable is not defined:

$ echo $VAR

$ echo ${VAR:-default}
default
$ echo $VAR

Specifying defaults to use when a variable is not defined and setting the variable if needed:

$ echo $VAR

$ echo ${VAR:=default}
default
$ echo $VAR
default