On 2/18/15 3:49 PM, Maarten Billemont wrote:
> > also this variant does the same:
> > $ (('ar[$idbad2]+=11'))
>
>
> Because (( and let are essentially equivalent.
>
>
> I think the more important question isn't "why does (( behave this way?",
> but rather "should (( behave this way?".
>
> It's probably not reasonable to expect the author to know and take into
> account that (( arr[$key] )) treats key's data as bash code.
What does `bash code' mean? It undergoes the usual set of word expansions.
--
``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/