On 6/30/25 5:06 AM, Isabella Bosia wrote:
this causes a parser error since commit 35bc7025

a=(0 1 2)
b=(0 1 2)
x=0
((i=$x,a[b[i]]))

using $ anywhere in (( )) makes subscripts not expandable

This was one of the results of this 2021 discussion:

https://lists.gnu.org/archive/html/bug-bash/2021-03/msg00056.html

You can get the result you want by not using the $.


--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    c...@case.edu    http://tiswww.cwru.edu/~chet/

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to