From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3445 invoked from network); 18 Dec 2003 01:44:15 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 18 Dec 2003 01:44:15 -0000 Received: (qmail 16831 invoked by alias); 18 Dec 2003 01:44:02 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6917 Received: (qmail 16820 invoked from network); 18 Dec 2003 01:44:01 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 18 Dec 2003 01:44:01 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [81.129.18.130] by sunsite.dk (MessageWall 1.0.8) with SMTP; 18 Dec 2003 1:43:58 -0000 Received: by umarumohammed.homeip.net (Postfix, from userid 1000) id 0511715AD24; Thu, 18 Dec 2003 01:44:40 +0000 (GMT) Subject: Re: how to pipe to stdout and stderr From: Ibraheem Umaru-Mohammed To: Andy Spiegl Cc: ZSH User List In-Reply-To: <20031218001201.GA27866@spiegl.de> References: <20031218001201.GA27866@spiegl.de> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1071711880.5099.9.camel@umarumohammed> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Thu, 18 Dec 2003 01:44:40 +0000 On Thu, 2003-12-18 at 00:12, Andy Spiegl wrote: > Maybe I'm just too tired right now, but I can't find the solution how to > pipe the standard output and standard error to 2 different programs. > > Example: > program foo (prints to stdout and stderr) > program bar1 should receive only stdout > program bar2 should receive only stderr > > How can I do this? Someone knows how to do that in bash, too? [...] ls touch foo ls foo bar ls: bar: No such file or directory foo ls foo bar > stdout 2> stderr cat stdout foo cat stderr ls: bar: No such file or directory [...] HTH, --ibz.