Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: 2 more questions



Uli Zappe <uli@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

> 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

or simply use a for loop, works with /bin/sh also:

 for i in $ARRAY; do echo $i; done | command.

Greetings, Wolfgang.



Messages sorted by: Reverse Date, Date, Thread, Author