Named pipes, eof, etc.

Linux & Unix newsgroup archiveLinux2003

Linuxmisc » Linux

Bryan Ho #1 / 1 Wed, 18 Jun 2003 15:40:03 GMT
I want to be able to run a program which takes stdin, and write data
to it whenever I feel like it. I can do this with fifo named pipes. e.g.:

txtplay < named_pipe.fifo
echo "Hello World" > named_pipe.fifo

        However, this has the disadvantage of the first command exiting
after the second has finished. What I want is the same as:

txtplay

in effect, so I can just stick in my data whenever I like, and not worry
about it seeing end-of-file. Unfortunately, I cannot simply do this, as I
want the data to be sent to it to be processed through a filter before the
program sees it.

        Why don't I just load the program each time I want to send data to
it? Too slow.
        What I want, basically, is a way of redirecting the output of a
given command to a fifo named pipe, without the end-of-file. While I'm at
it, how does this EOF business work? Is there a special "EOF" command, or is
it when no more data is received, or when the original program outputting
the data exits?

Thanks for any Enlightenment on the subject -- although I do prefer SawFish.
Ignore that last one.

--

Bryan Hoyt
bryh...@globe.net.nz
http://www.**-**.com/ ~artmusic

-----------------------------------

Humpty Dumpty was pushed.

This page is kept from the Linuxmisc archive of Linux and Unix newsgroups (snapshot 2022). Posts are shown as they were published, so commands, versions and addresses date from the original discussion. Linuxmisc.com now publishes a guide to online casinos in Canada.