bug-bash
[Top][All Lists]
Advanced

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

Re: V+=1 doesn't work if V is a reference to an integer array element


From: Chet Ramey
Subject: Re: V+=1 doesn't work if V is a reference to an integer array element
Date: Fri, 15 Jan 2021 15:24:07 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.6.0

On 1/15/21 11:50 AM, felix wrote:

   $ bash <(declare -f f |
            sed '1,2d;$s/.*/echo $BASH_VERSION/;s/local /declare /;')
   12
   /dev/fd/63: line 4: a[1]4: syntax error in expression (error token is "4")
   12
   declare -ai a=([0]="0" [1]="12")
   5.1.4(1)-release

It's all the same problem, a fix for which is in the devel branch.

--
``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/



reply via email to

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