Gentlemen, I have discovered a documentation oversight. In the manual,
we see:


              -u      Treat unset variables as an error when performing param-
                      eter  expansion.   If expansion is attempted on an unset
                      variable, the shell prints an error message, and, if not
                      interactive, exits with a non-zero status.

and

       ${parameter:?word}
              Display  Error if Null or Unset.  If parameter is null or unset,
              the expansion of word (or a message to that effect  if  word  is
              not  present) is written to the standard error and the shell, if
              it is not interactive, exits.  Otherwise, the value of parameter
              is substituted.

However, different behavior is observed between

set -u --
: $@ $*
: $1

and

set --
: ${*?} [EMAIL PROTECTED]
: ${1?}

Therefore the -u paragraph needs to add that "$@ and $* unset are not
caught by -u, but $1, $2... are".


Reply via email to