How to pipe stderr to a command in Bourne or Korn shell
Bob McGowen x4312 dept208
bob at wyse.wyse.com
Tue Oct 9 09:41:52 AEST 1990
In article <6133 at ge-dab.GE.COM> coleman at sunny.DAB.GE.COM (Richard Coleman) writes:
>
>--
>In article <1990Oct8.165133.17187 at cti-software.nl>, pim at 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 at wyse.com
More information about the Comp.unix.shell
mailing list