bug-bash
[Top][All Lists]
Advanced

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

Re: Behaviour of test -v with assoc array and quote character in key


From: Greg Wooledge
Subject: Re: Behaviour of test -v with assoc array and quote character in key
Date: Tue, 23 Feb 2021 08:32:40 -0500
User-agent: Mutt/1.10.1 (2018-07-13)

On Tue, Feb 23, 2021 at 02:03:30PM +0100, Léa Gris wrote:
> (
>   LANG=C
>   unset var assoc
>   var=\'\]
>   declare -Ai assoc
>   assoc[$var]=1
>   assoc[$var]+=1
>   ((assoc['$var']++))
>   typeset -p assoc
> )

This "works" in bash 5.0 but not in Debian's bash 5.1.  The -i flag is
irrelevant as well -- I get the same results with or without it (for
the command with (( )) in it).




reply via email to

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