Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Printing arrays for use with $()
- X-seq: zsh-users 9299
- From: DervishD <zsh@xxxxxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: Printing arrays for use with $()
- Date: Fri, 12 Aug 2005 00:28:47 +0200
- Cc: Zsh Users <zsh-users@xxxxxxxxxx>
- In-reply-to: <1050811163714.ZM2498@xxxxxxxxxxxxxxxxxxxxxxx>
- Mail-followup-to: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>, Zsh Users <zsh-users@xxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Organization: DervishD
- References: <20050811161654.GA8200@DervishD> <1050811163714.ZM2498@xxxxxxxxxxxxxxxxxxxxxxx>
Hi Bart :)
* Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> dixit:
> On Aug 11, 6:16pm, DervishD wrote:
> } Is there any way for printing the array to stdout and being able
> } to use that output as arguments for another command?
> The short answer is, no.
I've been trying this (without success):
command $(printf '"%s "' $array)
The thing is that the 'printf' command prints the file names
exactly as I want them, within double quotes, but 'command' see those
double quotes... quoted. Any way of avoiding this? I think that it
may be a solution.
I'm completely lost and I don't know how to make this script. The
only solution seems to be convert it to a shell function and use
'reply', but I need it to be able to be run as a command, not as a
function :(
The worst thing is that I had the intention of using a couple
more scripts in this way, generating a list of files to work on and
dumping it to stdout :( but without being able to solve this
problem...
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