[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: set -x vs. n=($@)
From: |
Chet Ramey |
Subject: |
Re: set -x vs. n=($@) |
Date: |
Tue, 5 Sep 2023 14:48:16 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.14.0 |
On 9/3/23 12:15 PM, Lawrence Velázquez wrote:
However...
bash-5.2$ declare -a c=("$a")
+ c=('foo')
+ declare -a c
You kind of have to. This isn't an assignment statement, since `declare'
is a builtin and its arguments have to be expanded before it's called and
set -x kicks in. The fact that it's an assignment builtin complicates
things.
--
``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/