[Top][All Lists]

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

Re: building arrays from non array variables using 'address@hidden'

From: Chet Ramey
Subject: Re: building arrays from non array variables using 'address@hidden'
Date: Sun, 24 Jan 2010 15:19:55 -0500
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv: Gecko/20100111 Lightning/1.0b1 Thunderbird/3.0.1

On 1/24/10 5:13 AM, Mart Frauenlob wrote:
> Hello,
> I'd like to ask, if the behavior of indexed array assignment using the
> form: 'address@hidden' is as expected.

Thanks for the report.  The question is what address@hidden should return
when it refers to a scalar variable that has not been assigned a value.
Previous versions of bash returned 1, not checking whether or not the
variable is set; the right answer is 0 if the variable is not set and 1

Any official change will probably wait until bash-4.2.  I have attached a
patch to evaluate, though.

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

Attachment: unset-var-length
Description: Text document

reply via email to

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