From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9045 invoked from network); 15 Jun 2003 17:43:36 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 15 Jun 2003 17:43:36 -0000 Received: (qmail 19762 invoked by alias); 15 Jun 2003 17:43:23 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6167 Received: (qmail 19755 invoked from network); 15 Jun 2003 17:43:23 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 15 Jun 2003 17:43:23 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [4.64.233.9] by sunsite.dk (MessageWall 1.0.8) with SMTP; 15 Jun 2003 17:43:22 -0000 Received: (from schaefer@localhost) by candle.brasslantern.com (8.11.6/8.11.6) id h5FHhLN19839 for zsh-users@sunsite.dk; Sun, 15 Jun 2003 10:43:21 -0700 From: Bart Schaefer Message-Id: <1030615174320.ZM19838@candle.brasslantern.com> Date: Sun, 15 Jun 2003 17:43:20 +0000 In-Reply-To: <20030615161141.GA23206@seas.upenn.edu> Comments: In reply to Pavol Juhas "Re: How to redirect stderr to a pipe and stdout to a file?" (Jun 15, 12:11pm) References: <20030615125030.GA4042@s.chello.no> <20030615161141.GA23206@seas.upenn.edu> X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-users@sunsite.dk Subject: Re: How to redirect stderr to a pipe and stdout to a file? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Jun 15, 12:11pm, Pavol Juhas wrote: } Subject: Re: How to redirect stderr to a pipe and stdout to a file? } } On Sun, Jun 15, 2003 at 02:50:30PM +0200, Haakon Riiser wrote: } > } > $ ls INVALID . 2>&1 >/dev/null | less } } You need to } setopt no_multios Multios are applied at the "pipeline" level of shell grammar, so you can also prevent the effects by introducing any complex structure; easiest is just to wrap the first command in { } like so: % { ls INVALID . 2>&1 >/dev/null } | less