bug-bash
[Top][All Lists]
Advanced

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

Re: parser bug in Q_ARITH


From: Chet Ramey
Subject: Re: parser bug in Q_ARITH
Date: Mon, 30 Jun 2025 09:07:57 -0400
User-agent: Mozilla Thunderbird

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    chet@case.edu    http://tiswww.cwru.edu/~chet/

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature


reply via email to

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