On 12/20/10 3:52 AM, jens.schmid...@arcor.de wrote:
>> -u  Treat unset variables as an error when substituting.
>>
>> I think the behaviour is consistent with the documentation.
> 
> The question is rather when to consider a variable set or unset.
> 
> For me, an empty string (or empty commadline) is as set or as
> unset as an empty array.  But I don't get an "unbound error" when
> accessing an empty string (or empty commandline), and I get one
> when accessing an empty array.

As the man page says:

A parameter is set if it has been assigned a value.  The null string is
a  valid  value.

Maybe I should add that an array has to have at least one index assigned
to be considered set.

The positional parameters are a special case, since that's what Posix
decided.

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    c...@case.edu    http://cnswww.cns.cwru.edu/~chet/

Reply via email to