assign default value in shell script

Shell
FOO=${VARIABLE:-default}  # If variable not set or null, use default.
Source

Also in Shell: