Comment on Writing Robust Bash Shell ScriptsComments−agumonkey14y set -u Another great thing I could have read in the effin manual.He could have added a little reminder about the ${VAR:-default} syntax. [[ http://www.ooblick.com/text/sh/ search for Quasi-variable constructs ]]Great read, thanks.−veyron14yOr look at the manpage ${parameter:-word} Use Default Values. If parameter is unset or null, the expan- sion of word is substituted. Otherwise, the value of parameter is substituted.−agumonkey14yAgreed, I was just sayin for the sake of the article, he brings up the subject of unitialized variables, without mentioning this other way.
Comments
He could have added a little reminder about the ${VAR:-default} syntax. [[ http://www.ooblick.com/text/sh/ search for Quasi-variable constructs ]]
Great read, thanks.
Or look at the manpage
Agreed, I was just sayin for the sake of the article, he brings up the subject of unitialized variables, without mentioning this other way.