[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: @K transformation
From: |
Lawrence Velázquez |
Subject: |
Re: @K transformation |
Date: |
Fri, 20 Aug 2021 18:37:19 -0400 |
User-agent: |
Cyrus-JMAP/3.5.0-alpha0-1118-g75eff666e5-fm-20210816.002-g75eff666 |
On Fri, Aug 20, 2021, at 6:11 PM, Léa Gris wrote:
> Le 21/08/2021 à 00:06, Chet Ramey écrivait :
> > The best way to clone an associative array is:
> >
> > declare -A options
> > eval options=\( "${assoc[@]@K}" \)
> >
> > The quoting @K performs is eval-safe.
> >
>
> Although I was not attempting to clone the Associative array but turn it
> into a flat array with interleaved key and value each as own element.
declare -a options
eval options=\( "${assoc[@]@K}" \)
--
vq
- feature request array expansion of keys values pairs and for k v loop, Léa Gris, 2021/08/18
- Re: feature request array expansion of keys values pairs and for k v loop, Koichi Murase, 2021/08/18
- @K transformation, Ilkka Virta, 2021/08/19
- Re: @K transformation, Koichi Murase, 2021/08/19
- Re: @K transformation, Léa Gris, 2021/08/19
- Re: @K transformation, Koichi Murase, 2021/08/19
- Re: @K transformation, Chet Ramey, 2021/08/20
- Re: @K transformation, Léa Gris, 2021/08/20
- Re: @K transformation,
Lawrence Velázquez <=
- Re: @K transformation, Greg Wooledge, 2021/08/20
- Re: @K transformation, Léa Gris, 2021/08/20
- use-cases promote thinking of limited application, L A Walsh, 2021/08/22
- Re: use-cases promote thinking of limited application, Koichi Murase, 2021/08/22
- Re: use-cases promote thinking of limited application, L A Walsh, 2021/08/23
- Re: use-cases promote thinking of limited application, Koichi Murase, 2021/08/23