bug-bash
[Top][All Lists]
Advanced

[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.



reply via email to

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