[lug] What the heck can I use ${VAR:-} for?

David L. Anselmi anselmi at anselmi.us
Wed Apr 16 17:40:51 MDT 2008


Sean Reifschneider wrote:
> Jeffrey Haemer wrote:
>  >    if [ "${BOOTUP:-}" != "verbose" ]; then

I was going to say that it's a nice smiley. :-}

[...]
> There is a mode you can run the shell in, which is off by default, in which
> referencing an unset variable is an error.

Sean knows a whole lot 'o Unix, doesn't he?

Dave



More information about the LUG mailing list