[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] Destroying arbitrary subset in an associative array?
From: |
Chet Ramey |
Subject: |
Re: [Help-bash] Destroying arbitrary subset in an associative array? |
Date: |
Sun, 25 Sep 2016 13:46:13 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 |
On 9/19/16 10:14 AM, Dan Douglas wrote:
> On Mon, Sep 19, 2016 at 8:25 AM, Greg Wooledge <address@hidden> wrote:
>> The more complex reason is... whatever Dan said.
>>
>
> When a[$x] becomes a[]] or a['] etc. Yes, not quoting the glob is also
> wrong, but the more immediate problem here is bash to treating the
> index value as syntax because the $x was expanded first.
Sure. You have to guess. Right now, bash guesses that the $x was not
expanded.
--
``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/