From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2234 invoked from network); 21 Feb 1997 15:26:01 -0000 Received: from euclid.skiles.gatech.edu (list@130.207.146.50) by coral.primenet.com.au with SMTP; 21 Feb 1997 15:26:01 -0000 Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id KAA06067; Fri, 21 Feb 1997 10:19:01 -0500 (EST) Resent-Date: Fri, 21 Feb 1997 10:10:11 -0500 (EST) From: Zefram Message-Id: <26145.199702211512@stone.dcs.warwick.ac.uk> Subject: Re: 2 more questions To: uli@tallowcross.uni-frankfurt.de (Uli Zappe) Date: Fri, 21 Feb 1997 15:12:09 +0000 (GMT) Cc: zsh-users@math.gatech.edu In-Reply-To: <9702211128.AA08309@tallowcross.uni-frankfurt.de> from "Uli Zappe" at Feb 21, 97 12:28:36 pm X-Loop: zefram@dcs.warwick.ac.uk X-Stardate: [-31]8918.16 X-US-Congress: Moronic fuckers X-Personality: INTJ Content-Type: text Resent-Message-ID: <"PcouC3.0.kG1.IhR3p"@euclid> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/694 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Uli Zappe wrote: >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. print -l "$ARRAY[@]" | command but in the case of zero elements this will provide a single newline, and it will produce ambiguous output if the array elements can contain newlines. command "$ARRAY[@]" is the best interface, if it is feasible. -zefram