[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How do we get state of a flag in set -o ...
From: |
Grisha Levit |
Subject: |
Re: How do we get state of a flag in set -o ... |
Date: |
Tue, 11 Jul 2023 19:57:38 -0400 |
On Tue, Jul 11, 2023, 18:47 Greg Wooledge <greg@wooledge.org> wrote:
> Now, obviously you could throw in 'eval' into the picture, but then you
> would need to use "${list[@]@Q}" or something.
>
I think the canonical way is to use the @K transformation, making sure the
rhs of the assignment is quoted:
$ declare -A A=('k $1' 'v $1')
$ declare -A B="(${A[@]@K})"
$ declare -p B
declare -A B=(["k \$1"]="v \$1" )
- Re: How do we get state of a flag in set -o ..., (continued)
- Re: How do we get state of a flag in set -o ..., Greg Wooledge, 2023/07/11
- Re: How do we get state of a flag in set -o ..., alex xmb ratchev, 2023/07/11
- Re: How do we get state of a flag in set -o ..., alex xmb ratchev, 2023/07/11
- Re: How do we get state of a flag in set -o ..., alex xmb ratchev, 2023/07/11
- Re: How do we get state of a flag in set -o ..., Greg Wooledge, 2023/07/11
- Re: How do we get state of a flag in set -o ..., alex xmb ratchev, 2023/07/11
- Re: How do we get state of a flag in set -o ..., Greg Wooledge, 2023/07/11
- Re: How do we get state of a flag in set -o ..., alex xmb ratchev, 2023/07/11
- Re: How do we get state of a flag in set -o ..., Greg Wooledge, 2023/07/11
- Re: How do we get state of a flag in set -o ..., alex xmb ratchev, 2023/07/11
- Re: How do we get state of a flag in set -o ...,
Grisha Levit <=
- Re: How do we get state of a flag in set -o ..., Greg Wooledge, 2023/07/11
- Re: How do we get state of a flag in set -o ..., Kerin Millar, 2023/07/11
- Re: How do we get state of a flag in set -o ..., alex xmb ratchev, 2023/07/11
- Re: How do we get state of a flag in set -o ..., Kerin Millar, 2023/07/11
- Re: How do we get state of a flag in set -o ..., Chet Ramey, 2023/07/12
- Re: How do we get state of a flag in set -o ..., alex xmb ratchev, 2023/07/13
- Re: How do we get state of a flag in set -o ..., Chet Ramey, 2023/07/12
Re: How do we get state of a flag in set -o ..., Emanuele Torre, 2023/07/11
Re: How do we get state of a flag in set -o ..., Chet Ramey, 2023/07/12