Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #15189
| From | Greg Wooledge <wooledg@eeg.ccf.org> |
|---|---|
| Newsgroups | gnu.bash.bug |
| Subject | Re: Unexpected result of array assignment |
| Date | 2019-07-18 08:12 -0400 |
| Message-ID | <mailman.1639.1563451958.2688.bug-bash@gnu.org> (permalink) |
| References | <nycvar.YAK.7.76.1907180212120.95422@nzl.bcra-fbhepr.pb.hx> <af7d9768-fe41-2c93-ee05-58932a390b80@t-online.de> <20190718121206.GV2450@eeg.ccf.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"
Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread
Re: Unexpected result of array assignment Greg Wooledge <wooledg@eeg.ccf.org> - 2019-07-18 08:12 -0400
csiph-web