From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from merlin.resmel.bhp.com.au ([134.18.1.6]) by hawkwind.utcs.toronto.edu with SMTP id <24003>; Wed, 8 Dec 1993 20:37:36 -0500 Received: from cerberus.bhpese.oz.au by merlin.resmel.bhp.com.au with SMTP id AA02392 (5.65c/IDA-1.4.4 for ); Thu, 9 Dec 1993 12:36:26 +1100 Received: from localhost by cerberus.bhpese.oz.au with SMTP id AA00252; Thu, 9 Dec 1993 12:36:40 +1100; sendmail 5.67a/Sm3.8RMPSU (from Sm@cerberus.bhpese.oz.au for rc@hawkwind.utcs.toronto.edu) Message-Id: <199312090136.AA00252@cerberus.bhpese.oz.au> To: rc@hawkwind.utcs.toronto.edu Subject: Re: Translating question In-Reply-To: Your message of "Wed, 08 Dec 93 19:20:16 EST." <9312081920.aa20477@ceres.srg.af.mil> X-Face: '82~l%BnDBWVn])DV^cl_%bla$T]kNbRN&]>v{ED9[" >The following fragment was easy to prototype in rc: > > prog1 |[3] prog2 # output of fd 3 is piped to stdin > >but trying to convert it to Bourne shell is making me nuts! I want >stdout and stderr to go to "the usual place" with just "special stuff" >being piped into the second program. Could someone give me a clue >before I have to embarrass myself in comp.unix.shell? This is probably not optimal, but it seems to work: (exec 4>&1;((echo a; echo b>&2; echo c>&3))>&4 3>&1 | cat > 1); cat 1; rm 1 so you could probably use: (exec 4>&1;prog2 >&4 3>&1 | prog2) Sm