[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

document -u $@ $* special case

From: jidanni
Subject: document -u $@ $* special case
Date: Thu, 27 Nov 2008 01:11:32 +0800

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.


              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


set --
: ${*?} address@hidden
: ${1?}

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]