On 2/18/15 4:14 PM, emanuelczi...@cryptolab.net wrote: > tl;dr: thanks! no reply needed; > > Thanks guys. I had a hard time accepting that this is how it's supposed to > work. > I accepted it now. :)
Yeah. The expression between (( and )) is word expanded, since (( ... )) is supposed to be exactly equivalent to let "...". The real issue is that assignment statements in arithmetic expressions that contain array references are also word expanded, almost as if they were executed in an assignment statement context. This is how bash has always behaved, though; backwards compatibility is a concern. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, ITS, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/