From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: zsh-workers-request@euclid.skiles.gatech.edu Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by coral.primenet.com.au (8.7.5/8.7.3) with ESMTP id UAA18262 for ; Wed, 30 Oct 1996 20:19:59 +1100 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id EAA26334; Wed, 30 Oct 1996 04:19:47 -0500 (EST) Resent-Date: Wed, 30 Oct 1996 04:09:36 -0500 (EST) Message-Id: <199610300907.KAA18108@hydra.ifh.de> X-Authentication-Warning: hydra.ifh.de: Host pws@localhost didn't use HELO protocol To: gsker@lenti.med.umn.edu, zsh-users@math.gatech.edu Subject: Re: pipes and redirection In-reply-to: "Gerald Skerbitz"'s message of "Tue, 29 Oct 1996 13:22:23 MET." Date: Wed, 30 Oct 1996 10:07:56 +0100 From: Peter Stephenson Resent-Message-ID: <"t07482.0.CL6.GjnTo"@euclid> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/477 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Gerald Skerbitz wrote: > (print -u2 This is stderr;print This is stdout) 2>&1 1>test | less > > which brought up less, with _both_ strings displayed. > So, clearly, the | is picking up both streams. > > Is there a way to cleanly do what I want it to do? The correct answer, if you have a recent version of zsh, is to `setopt nomultios' before trying the above. Zsh's multio feature is redirecting stdout both to test and to the pipe. It's a little counterintuitive here, as has been pointed out before. The option appeared some time mid 2.6beta. -- Peter Stephenson Tel: +49 33762 77366 WWW: http://www.ifh.de/~pws/ Fax: +49 33762 77413 Deutches Electronen-Synchrotron --- Institut fuer Hochenergiephysik Zeuthen DESY-IfH, 15735 Zeuthen, Germany.