🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.shell
Article #1167

pipes and stdin (want keyboard back)

#1167
From: Bob Debula
Date: Tue, 18 Sep 1990 15:19
21 lines
1264 bytes
I have a script that I'm trying to use in conjunction
with "rn".  Basically, "rn" allows you to save (with "s")
a news article to a pipe. I thought I would be able to do
something like:

s | fnews

Unfortunately, I want to take input from the keyboard
later in the fnews script (I immediately cat the
new article text to a temporary file).  My understanding
is that the in piping to "fnews", the file descriptor (0)
for stdin has been reassigned to the pipe.  Is there
any relatively straight-forward way to get it back to
the keyboard?  My apologies if this is a simple
or much discussed problem (I haven't been able to find
anything on it in several "UNIX guru" type books).
Thanks for any help you may be able to give.

(By the way, I'm using the Korn shell, but I suppose
the answer would probably apply to Bourne as well).
Technical Details
Message-ID: <4753@nisca.ircc.ohio-state.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!zaphod.mps.ohio-state.edu!nisca.ircc.ohio-state.edu!bobd

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!zaphod.mps.ohio-state.edu!nisca.ircc.ohio-state.edu!bobd
From: bobd@nisca.ircc.ohio-state.edu (Bob Debula)
Newsgroups: comp.unix.shell
Subject: pipes and stdin (want keyboard back)
Keywords: pipes stdin
Message-ID: <4753@nisca.ircc.ohio-state.edu>
Date: 18 Sep 90 15:19:14 GMT
Organization: The Ohio State University (IRCC)
Lines: 21