Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Printing arrays for use with $()
Hi Bart :)
Sorry for self replying...
* DervishD <zsh@xxxxxxxxxxxx> dixit:
> array=(${(s.:.):-`print -- ${(j.:.)list}`})
Better:
array=( ${(ps:\0:)"$(print -N -- $list)"} )
Although I don't know why I need the double quotes if I use ":-"
after the (ps) flag :? Is to avoid the shell splitting the entire
string in the assignment before we can do the (ps)?
Raúl Núñez de Arenas Coronado
--
Linux Registered User 88736 | http://www.dervishd.net
http://www.pleyades.net & http://www.gotesdelluna.net
It's my PC and I'll cry if I want to...
Messages sorted by:
Reverse Date,
Date,
Thread,
Author