Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!apple!mips!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!uflorida!novavax!hcx1!brad From: brad@SSD.CSD.HARRIS.COM (Brad Appleton) Newsgroups: comp.unix.questions Subject: Re: Piping stderr in Korn and/or Bourne Message-ID: <3663@hcx1.SSD.CSD.HARRIS.COM> Date: 8 Apr 90 23:20:57 GMT References: <3620@hcx1.SSD.CSD.HARRIS.COM> <9000029@m.cs.uiuc.edu> <3660@hcx1.SSD.CSD.HARRIS.COM> Sender: news@hcx1.SSD.CSD.HARRIS.COM Organization: Harris Computer Systems, Fort Lauderdale, FL Lines: 28 In article <3660@hcx1.SSD.CSD.HARRIS.COM> brad@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@ssd.csd.harris.com (305) 973-5007 Fort Lauderdale, FL USA {uunet,novavax}!hcx1!brad -=-=-=-=-=-=-=-=-=-= Disclaimer: I said it, not my company! -=-=-=-=-=-=-=-=-=-