[clug] Ever received a .dat file from an <other OS> user?
steve jenkin
sjenkin at canb.auug.org.au
Sat Jan 16 03:29:46 MST 2010
Kevin Pulo wrote on 16/01/10 9:01 PM:
> I thought there was a shopt or set option which is the equivalent of
> "use strict" (and tcsh behaves this way by default when unset
> variables are expanded), but I can't seem to find anything for it...
> maybe I'm thinking of failglob, which is close but not quite...
>
> Kev.
Perhaps:
set -o nounset
or
set -u
"man bash" says about 'set' in SHELL BUILTIN COMMANDS.
(-o) nounset Same as -u.
-u Treat unset variables as an error when performing
parameter expansion. If expansion is attempted on
an unset variable, the shell prints an error mes-
sage, and, if not interactive, exits with a non-
zero status.
Doesn't work in an interactive shell :-(
Haven't tested in a script.
HTH
s
More information about the linux
mailing list