> > 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.
I spoke too soon again. The manual page also says:
An array variable is considered set if a subscript has been assigned a
value. The null string is a valid value.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU [email protected] http://cnswww.cns.cwru.edu/~chet/