Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #15189 > unrolled thread

Re: Unexpected result of array assignment

Started byGreg Wooledge <wooledg@eeg.ccf.org>
First post2019-07-18 08:12 -0400
Last post2019-07-18 08:12 -0400
Articles 1 — 1 participant

Back to article view | Back to gnu.bash.bug

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Unexpected result of array assignment Greg Wooledge <wooledg@eeg.ccf.org> - 2019-07-18 08:12 -0400

#15189 — Re: Unexpected result of array assignment

FromGreg Wooledge <wooledg@eeg.ccf.org>
Date2019-07-18 08:12 -0400
SubjectRe: Unexpected result of array assignment
Message-ID<mailman.1639.1563451958.2688.bug-bash@gnu.org>
On Thu, Jul 18, 2019 at 10:58:52AM +0200, Henning wrote:
> On 18/07/2019 03:16, Darren 'Tadgy' Austin wrote:
> 
> >          foo=(["key"]="${foo["key"]} value2")
> 
> using eval shoud also succeed, even for older bash:
> 
> 	eval 'foo=(["key"]="'"${foo["key"]}"' value2")'

If you just want to work around the bug, why not do it in the simplest
way possible?

foo["key"]+=" value2"

[toc] | [standalone]


Back to top | Article view | gnu.bash.bug


csiph-web