On Thu, Aug 31, 2017 at 02:51:58AM -0700, Andy Chu wrote:
> also invalid:
> "${A}" # this is an implicit "address@hidden" but is confusing
Actually, it's even worse than that. "${A}" and "$A" and "${A[0]}"
are all equivalent.
wooledg:~$ A=(an array); echo "${A}"
an
wooledg:~$ unset A; A[1]=an; echo "${A}"
wooledg:~$ unset A; declare -A A; A[zebra]=an A[1]=ugly A[0]=array; echo "${A}"
array
The equivalence of $A == ${A[0]} is one of the most horribly annoying
misfeatures ever.