help-bash
[Top][All Lists]
Advanced

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

Re: [Help-bash] Using PE to specify an array


From: Jesse Hathaway
Subject: Re: [Help-bash] Using PE to specify an array
Date: Fri, 14 Sep 2018 10:06:33 -0500

On Fri, Sep 14, 2018 at 7:34 AM Bruce Hohl <address@hidden> wrote:
> # I DID EXPECT THIS TO WORK as it seems to expand as desired.
> $ _$var1+="(789)"
> bash: _ugly_hash+=(789): command not found

eval is a possible option

eval "_${var1}+=(789)"

unless there is a more idiomatic way of having bash perform the
interpolation on the variable name.



reply via email to

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