From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5997 invoked from network); 15 Jun 2003 12:50:48 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 15 Jun 2003 12:50:48 -0000 Received: (qmail 1134 invoked by alias); 15 Jun 2003 12:50:32 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6164 Received: (qmail 1125 invoked from network); 15 Jun 2003 12:50:31 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 15 Jun 2003 12:50:31 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [213.46.243.26] by sunsite.dk (MessageWall 1.0.8) with SMTP; 15 Jun 2003 12:50:31 -0000 Received: from s.hn.org ([80.111.3.215]) by amsfep16-int.chello.nl (InterMail vM.5.01.05.17 201-253-122-126-117-20021021) with SMTP id <20030615125030.HCTP28742.amsfep16-int.chello.nl@s.hn.org> for ; Sun, 15 Jun 2003 14:50:30 +0200 Received: (qmail 4457 invoked by uid 1000); 15 Jun 2003 12:50:30 -0000 Date: Sun, 15 Jun 2003 14:50:30 +0200 From: Haakon Riiser To: zsh-users@sunsite.dk Subject: How to redirect stderr to a pipe and stdout to a file? Message-ID: <20030615125030.GA4042@s.chello.no> Mail-Followup-To: zsh-users@sunsite.dk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i In bash, I could always do $ ls INVALID . 2>&1 >/dev/null | less to send stderr: ls: INVALID: No such file or directory to the less buffer and stdout to /dev/null. When I use the same command in zsh 4.0.6, _both_ stderr and stdout is sent to less. If I remove "| less" from the command, it works as it should: stdout is discarded and stderr is sent to the terminal. I've looked through the chapter on redirection in zshmisc(1), but I couldn't find an answer. (Of course, that doesn't mean it's not there. :-) Thanks in advance for any help. -- Haakon