[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= "#obj[@]", then it
> is clear to me that the user wants the length of an array named "obj".
Stop there. In something like ${#obj[@]}, `param' is `obj[@]'. 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 chet@case.edu http://cnswww.cns.cwru.edu/~chet/
- 4.4 change in behavior from 4.3: how to catch unset when using ${#length}, L. A. Walsh, 2016/10/21
- Re: 4.4 change in behavior from 4.3: how to catch unset when using ${#length}, Eduardo Bustamante, 2016/10/22
- Re: 4.4 change in behavior from 4.3: how to catch unset when using ${#length}, Chet Ramey, 2016/10/24
- Re: 4.4 change in behavior from 4.3: how to catch unset when using ${#length}, L. A. Walsh, 2016/10/24
- Re: 4.4 change in behavior from 4.3: how to catch unset when using ${#length},
Chet Ramey <=
- Re: 4.4 change in behavior from 4.3: how to catch unset when using ${#length}, L. A. Walsh, 2016/10/28
- Re: 4.4 change in behavior from 4.3: how to catch unset when using ${#length}, Chet Ramey, 2016/10/28
- Re: 4.4 change in behavior from 4.3: how to catch unset when using ${#length}, L. A. Walsh, 2016/10/29
- Re: 4.4 change in behavior from 4.3: how to catch unset when using ${#length}, Chet Ramey, 2016/10/29
- Re: 4.4 change in behavior from 4.3: how to catch unset when using ${#length}, L. A. Walsh, 2016/10/29