On 2/4/15 9:42 AM, Greg Wooledge wrote:
> imadev:~$ unset a; declare -A a; a=(["@"]=foo [!]=bar); declare -p a
> declare -A a='([@]="foo" ["!"]="bar" )'
>
> imadev:~$ unset a; declare -A a='([@]="foo" ["!"]="bar" )'
> bash: [@]="foo": invalid associative array key
>
> If the declare -p output is intended to be reusable shell code, then
> this is surely a bug. (Bash 4.3.30.)
You're right, it should be quoted.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU [email protected] http://cnswww.cns.cwru.edu/~chet/