help-bash
[Top][All Lists]
Advanced

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

Re: will this idxarr['1']=error ever get fixed


From: Chet Ramey
Subject: Re: will this idxarr['1']=error ever get fixed
Date: Tue, 30 Nov 2021 09:15:58 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.3.2

On 11/28/21 3:46 AM, Alex fxmbsw7 Ratchev wrote:
> declare "foo['1']=asd"
> 
>             bash: '1': syntax error: operand expected (error token is "'1'")
> 

You can make the error message go away by fixing your buggy code. ['1'] is
not a valid indexed array subscript.

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