help-bash
[Top][All Lists]
Advanced

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

Re: is it really required that arr['1']=bla gives syntax error instead o


From: Jesse Hathaway
Subject: Re: is it really required that arr['1']=bla gives syntax error instead of parse '1' as 1
Date: Mon, 19 Jul 2021 10:30:36 -0500

That does seem inconsistent with how bash treats double quoted array
subscripts and variable subscripts.

all these work:

    arr["1"]=bar
    one='1'
    arr[$one]=foo
    arr["$one"]=baz



reply via email to

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