To get details of how to handle parameter/variable expansion in bash,
using hard-to-google code like ${a:-default}
and ${a:?"required"}
…
See the bash manual about Shell Parameter Expansion
Thanks
I found the docs via this stackoverflow response