Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: 2 more questions
- X-seq: zsh-users 691
- From: Tomas Gradin <tg@xxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxxxxxxx
- Subject: Re: 2 more questions
- Date: Fri, 21 Feb 1997 15:41:43 +0100
- Cc: Uli Zappe <uli@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- In-reply-to: Your message of "Fri, 21 Feb 1997 12:28:36 +0100." <9702211128.AA08309@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
>1. Is there a way in zsh to pass the standard output to a parameter
> instead of the standard input of a command? I.e. I have
>
> command1 | command2 parameter
>
> and need the output of command1 as the parameter for command2
command2 =(command1)
>2. How do I pipe the elements of an array into a command? If I do a
>
> echo $ARRAY | command
>
> the elements are separated only by whitespace instead of newlines
> which will not work correctly especially if the elements possibly
> contain whitespace themselves. It works, of course, with a for-do
> loop but that's not efficient enough.
echo $ARRAY | xargs -n 1 command
/tg
Messages sorted by:
Reverse Date,
Date,
Thread,
Author