On 1/7/16 1:54 AM, James Thomas Moon wrote:
> I attempted to reproduce the error. The closest error I could reproduce is
> slightly different than my original email suggests.
> The problem I reproduced below is an undefined variable. To the best of my
> recollection, the original error was silent whereas this error, posted
> below, is "unbound variable". This may lead to a "behaves as expected"
> resolution.
A variable is unset until it has been assigned a value. An array variable
without any assigned elements is considered unset. This is how bash has
behaved at least back to bash-3.2.
If there are no positional parameters, "$@" expands to nothing, so it's
no different from not specifying any values in a compound assignment.
--
``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/