Path: utzoo!attcan!uunet!seismo!dimacs.rutgers.edu!mips!wyse!bob From: bob@wyse.wyse.com (Bob McGowen x4312 dept208) Newsgroups: comp.unix.shell Subject: Re: How to pipe stderr to a command in Bourne or Korn shell Message-ID: <3002@wyse.wyse.com> Date: 8 Oct 90 23:41:52 GMT References: <1990Oct8.165133.17187@cti-software.nl> <6133@ge-dab.GE.COM> Sender: news@wyse.wyse.com Reply-To: bob@wyse.UUCP (Bob McGowen x4312 dept208) Organization: Wyse Technology Lines: 26 In article <6133@ge-dab.GE.COM> coleman@sunny.DAB.GE.COM (Richard Coleman) writes: > >-- >In article <1990Oct8.165133.17187@cti-software.nl>, pim@cti-software.nl (Pim Zandbergen) writes: >|> >|> How can one redirect stderr to a command while leaving stdout unaffected ? ^^^^^^^^ ^^^^^^^^^^^^ > > >For csh and bash try (command > temp1) >& temp2 >For sh command 2> temp > >somebody else will have to handle ksh. > The question was how to redirect to a command, not a file. You might think that something like 2| would work, but it doesn't (at least in sh, I have no ksh to try it on). I have tried several permutations of re-ordering file descriptors and trying to use new ones with the _exec- builtin but have had no success yet. Bob McGowan (standard disclaimer, these are my own ...) Product Support, Wyse Technology, San Jose, CA ..!uunet!wyse!bob bob@wyse.com