bug-bash
[Top][All Lists]
Advanced

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

Re: Issue declaring an array via a variable name


From: Lawrence Velázquez
Subject: Re: Issue declaring an array via a variable name
Date: Sun, 22 Aug 2021 16:47:28 -0400
User-agent: Cyrus-JMAP/3.5.0-alpha0-1118-g75eff666e5-fm-20210816.002-g75eff666

On Sun, Aug 22, 2021, at 4:38 PM, Alex fxmbsw7 Ratchev wrote:
> last time again

You promise?

> one pair quotes, not more

Except you're wrong.

$ val=foo
$ declare "$val"='x'
$ declare -p "$val"
declare -- foo="x"

$ val=bar
$ declare -a "$val"='(baz quux)'
$ declare -p "$val"
declare -a bar=([0]="baz" [1]="quux")


-- 
vq



reply via email to

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