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:
Mon, 15 Feb 2016 13:37:10 -0500
User-agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.5.1
On 2/15/16 12:35 PM, Linda Walsh wrote:
> Bash Version: 4.2
> Patch Level: 53
> Release Status: release
>
> Description:
> [Detailed description of the problem, suggestion, or complaint.]
>
> When I create hash and later add keys using the form
> "HASH+=([key]=VALUE)", if KEY already existed in the HASH, then
> I get the += applied to the VALUE as well
> (strings get appended, ints get added).
>
> Whether '+=' or '=' is used in the VALUE assignment, the
> effect is '+='.http://lists.gnu.org/archive/html/bug-bash/2014-11/msg00169.htmlhttp://lists.gnu.org/archive/html/bug-bash/2014-11/msg00179.html
--
``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/