[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: @K transformation
From: |
Greg Wooledge |
Subject: |
Re: @K transformation |
Date: |
Fri, 20 Aug 2021 18:59:25 -0400 |
The fact that "${a[@]@K}" expands to a single word is surprising to me.
I know someone else already mentioned it in this thread (sorry, I forgot
who it was), but it would be nice if there were a similar one that gave
a list of multiple words.
unicorn:~$ printf '<%s> ' "${a[@]@Q}"; echo
<'1'> <'2'> <'3'>
unicorn:~$ printf '<%s> ' "${a[@]@U}"; echo
<1> <2> <3>
unicorn:~$ printf '<%s> ' "${a[@]@L}"; echo
<1> <2> <3>
unicorn:~$ printf '<%s> ' "${a[@]@E}"; echo
<1> <2> <3>
unicorn:~$ printf '<%s> ' "${a[@]@K}"; echo
<0 "1" 1 "2" 2 "3">
It really sticks out.
- 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, 2021/08/20
- Re: @K transformation,
Greg Wooledge <=
- 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