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).