rc-list - mailing list for the rc(1) shell
 help / color / mirror / Atom feed
From: Scott Merrilees <Sm@cerberus.bhpese.oz.au>
To: rc@hawkwind.utcs.toronto.edu
Subject: Re: Translating question
Date: Wed, 8 Dec 1993 20:36:38 -0500	[thread overview]
Message-ID: <199312090136.AA00252@cerberus.bhpese.oz.au> (raw)
In-Reply-To: Your message of "Wed, 08 Dec 93 19:20:16 EST." <9312081920.aa20477@ceres.srg.af.mil>


>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


  reply	other threads:[~1993-12-09  1:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-12-09  0:20 Tom Culliton x2278
1993-12-09  1:36 ` Scott Merrilees [this message]
1993-12-09  1:47   ` Scott Merrilees

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199312090136.AA00252@cerberus.bhpese.oz.au \
    --to=sm@cerberus.bhpese.oz.au \
    --cc=rc@hawkwind.utcs.toronto.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).