zsh-users
 help / color / mirror / code / Atom feed
* Printing arrays for use with $()
@ 2005-08-11 16:16 DervishD
  2005-08-11 16:37 ` Bart Schaefer
  2005-08-11 19:40 ` Dan Nelson
  0 siblings, 2 replies; 18+ messages in thread
From: DervishD @ 2005-08-11 16:16 UTC (permalink / raw)
  To: Zsh Users

    Hi all :)

    I have a script which produces a list of files to stdout. It just
prints an array (namely, something like "print -l -- $array" right
now), and I want to use that list in this way:

    whatevercommand $(myscript)

    Obviously the above doesn't work because the spaces in the file
names are not quoted (special character like the square brackets are,
though), but I cannot do this:

    print -l -- ${(qq)array}

    for printing because then even the single quotes are quoted (this
happens too using three and four 'q' flags).

    Is there any way for printing the array to stdout and being able
to use that output as arguments for another command? Please note that
this is a script, not a function, so I cannot return the array, I
must print it :(

    Thanks a lot in advance, dudes :)

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


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2005-08-13 21:49 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-11 16:16 Printing arrays for use with $() DervishD
2005-08-11 16:37 ` Bart Schaefer
2005-08-11 17:01   ` DervishD
2005-08-11 22:28   ` DervishD
2005-08-12  2:07     ` Wayne Davison
2005-08-12  7:45       ` DervishD
2005-08-12  2:27     ` Bart Schaefer
2005-08-12  8:29       ` DervishD
2005-08-12 14:37         ` Bart Schaefer
2005-08-12 14:52           ` DervishD
2005-08-12 14:32       ` DervishD
2005-08-12 14:57         ` DervishD
2005-08-13  1:34           ` Bart Schaefer
2005-08-13  8:28             ` DervishD
2005-08-13 18:54               ` Bart Schaefer
2005-08-13 21:52                 ` DervishD
2005-08-11 19:40 ` Dan Nelson
2005-08-11 20:09   ` DervishD

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).