bug-bash
[Top][All Lists]
Advanced

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

Re: bug adding K,V pairs to existing hash with HASH+=([K]=V)


From: Chet Ramey
Subject: Re: bug adding K,V pairs to existing hash with HASH+=([K]=V)
Date: Tue, 16 Feb 2016 08:59:25 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.5.1

On 2/16/16 2:06 AM, Dan Douglas wrote:
> Ah so `arr+=([a]=x [b]=y)` will no longer be the same as `arr+=([a]+=x
> [b]+=y)`? I never liked that for associative arrays because the only
> workaround was to do multiple arr[key]= assignments to update or add
> more than one element at a time.
> 
> My thinking was that this is due to bash's unique auto-incrementing of
> indexed array keys. 

A simple bug, nothing more.

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



reply via email to

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