Note to self: bash is cool!!!!
I was made aware that you can define a default value for a variable in the following manner:
${parameter:-word}
So if parameter is unset or null, the expression is replaced with the expansion of ‘word’. I went searching the bash man page for more information and it has lots of other goodies:
${parameter:-word} : word replaces the expression when parameter is unset or null.
${parameter:=word}: word is assigned to parameter when parameter is unset or null.
${parameter:?word}: word is output to stderr if parameter is unset or null.
${parameter:+word}: replace parameter with word when parameter is null or unset.
${parameter:offset}
${parameter:offset:length}: A substring of parameter is expanded.
For more specifics of how these work check out the bash man page under parameter expansion section.