bug-bash
[Top][All Lists]
Advanced

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

Bug using ] as index when declaring associative array


From: Evan Gates
Subject: Bug using ] as index when declaring associative array
Date: Wed, 23 Oct 2013 13:17:12 -0700

I recently tried to use ] as an index in an associative array. While
it works fine after the array is declared, I could not figure out a
way to include it in the initial declaration.

To reproduce:

declare -A aarr
aarr[\]]=rbrac
declare -p aarr # this should print a legal declaration for aarr
eval $(declare -p aarr) # results in "bash: []]=rbrac: bad array subscript"

-emg



reply via email to

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