How to get input from a file to come from output of a process?

How to get input from a file to come from output of a process?

Post by Joel M. Hoffm » Tue, 07 Apr 1992 11:09:22

Is this possible:  I'd like any process that opens a certain file for
reading to get the output of another process.  For example, any
process opening ~/.plan would get the output of " rwho | grep `whoami` ".
That is, the command " cat < foo " should be linked somehow to
"bar | cat" for any foo and bar that I choose.

Is there a general solution to this problem?



How to get input from a file to come from output of a process?

Post by Jonathan I. Kame » Tue, 07 Apr 1992 23:48:13

If your system supports FIFOs, then you can create a FIFO, have a
program open it and write to it, and then have other programs open it
to read from it.

See the man page(s) for mknod to find out if FIFOs are supported on
your system.

There are several examples of this in the alt.sources archives.
Search in the index for the words "plan" or "FIFO" in order to find


MIT Information Systems/Athena              Moderator, news.answers
    (Send correspondence related to the news.answers newsgroup
        {and ONLY correspondence related to the newsgroup}


1. background process runs and output comes to terminal in 4.3.3

Running an AIX using class and had students do a
ls -R / &
This should have stopped almost instantly as ls tried to write to terminal.
Instead, ls spilled its guts out.

Found that stty had terminal output stop option off. (that is, stty -tostop)
This is not the posix standard.  Has anybody else run into this (4.3.2 works properly).
Is this a bug?  Or should I check more and see if somebody decided to override a default
Norman Levin

2. Menu driven backup solution

3. sed input file to output file

4. High speed printers

5. pppd gets tcgetattr input/output error(5)...

6. full switch to Hurd - possible?

7. Netscape and Linux problem

8. getting output from a program that requires input in a script

9. Data input/output with co-process

10. Regain access to process input/output

11. Help: redirecting process input/output

12. suggestions for parallel processing of input and output packets