bug-bash
[Top][All Lists]
Advanced

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

Re: 4.4 change in behavior from 4.3: how to catch unset when using ${#le


From: Chet Ramey
Subject: Re: 4.4 change in behavior from 4.3: how to catch unset when using ${#length}
Date: Fri, 28 Oct 2016 09:59:54 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.4.0

On 10/24/16 7:32 PM, L. A. Walsh wrote:

>    I don't understand the ambiguity.  If param= "address@hidden", then it
> is clear to me that the user wants the length of an array named "obj".

Stop there.  In something like address@hidden, `param' is address@hidden'.  The
`${#param}' is a clearly-defined word expansion, separate from the
`[:]-' forms:

http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_02

That's what we're talking about here.

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



reply via email to

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