Piping stderr in Korn and/or Bourne
Brad Appleton
brad at SSD.CSD.HARRIS.COM
Mon Apr 9 09:20:57 AEST 1990
In article <3660 at hcx1.SSD.CSD.HARRIS.COM> brad at SSD.CSD.HARRIS.COM (Brad Appleton) writes:
>
>Alan M. Carrol also suggested:
>
> $ tst 3>&2 2>&1 >&3 | sed 's/std/STD/'
> this is stdout
> this is STDerr
>
>(The old swap method) Works like a charm,
This is okay, the following is just plain wrong:
> also has the added benefit
>that it truly does leave stdout in the same place it was (tty or not).
>I hereby declare it the winner (IMHO of course ;-)
>
^ ^ ^
| | |
Now this is utter rubbish (and just plain dumb of me)!!
Of course stdout is not untouched here (it now points to
wherever stderr previously pointed). Disregard my previous nonsense
(or all of my non-sense if you like :-)
Thank you all once again for your help!
-=-=-=-=-=-=-=-=-=-=-= "And miles to go before I sleep." =-=-=-=-=-=-=-=-=-=-=-
Brad Appleton Harris Computer Systems brad at ssd.csd.harris.com
(305) 973-5007 Fort Lauderdale, FL USA {uunet,novavax}!hcx1!brad
-=-=-=-=-=-=-=-=-=-= Disclaimer: I said it, not my company! -=-=-=-=-=-=-=-=-=-
More information about the Comp.unix.questions
mailing list