Skip to content

Comment on Writing Robust Bash Shell Scriptsparent

Comments

Or 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.

Agreed, I was just sayin for the sake of the article, he brings up the subject of unitialized variables, without mentioning this other way.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.