How do you default a bash variable?

Parameter expansion!

$ FOO=dingo
$ echo "$FOO"
dingo

$ BAR="${FOO:-somedefault}"
$ echo $BAR
dingo

$ BAR="${FOOD:-somedefault}"
$ echo $BAR
somedefault

And guess what.

$ BAR="${FOOD:-I can use spaces here.}"
$ echo $BAR
I can use spaces here.