On 7/17/19 9:16 PM, Darren 'Tadgy' Austin wrote:
> Bash Version: 5.0
> Patch Level: 3
> Release Status: release
>
> Description:
> There seems to be unexpect (a bug?) behaviour with bash's handling of
> array assignments.
> Specifically, if you try to assign an array element a va
On 18/07/2019 14:12, Greg Wooledge wrote:
On Thu, Jul 18, 2019 at 10:58:52AM +0200, Henning wrote:
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"
Of co
On 18/07/2019 14:12, Greg Wooledge wrote:
On Thu, Jul 18, 2019 at 10:58:52AM +0200, Henning wrote:
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"
Of course, you are right.
H
On 18/07/2019 11:19, Andreas Schwab wrote:
On Jul 18 2019, Henning wrote:
eval 'foo=(["key"]="'"${foo["key"]}"' value2")'
This will break if ${foo["key"]} contains any of $ ` " \ .
Correct. I'd only taken blanks into account.
Henning
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
On Jul 18 2019, 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")'
This will break if ${foo["key"]} contains any of
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")'
Henning
Hi,
Thanks for the quick reply. :)
[I tried to cc b...@tlinx.org on this email, but get a SERVFAIL from both DNS
servers, so couldn't copy you in directly, sorry!]
On Wed, 17 Jul 2019, L A Walsh wrote:
> In bash4.4.12, Using:
> I think you need to tell bask that you are updating 'foo'
> instea
On 2019/07/17 18:16, Darren 'Tadgy' Austin wrote:
> Repeat-By:
> declare -A foo
> foo=(["key"]="value1")
> declare -p foo
> foo=(["key"]="${foo["key"]} value2")
> declare -p foo
>
> The above should result in 'foo["key"]' having a value of 'value1
>