Article View: comp.unix.wizards
Article #6937Re: named pipe
From: raj
Date: Fri, 22 Jan 1993 20:29
Date: Fri, 22 Jan 1993 20:29
47 lines
2014 bytes
2014 bytes
In article <1993Jan22.185326.679@cine88.cineca.it>, marcello@deis20.cineca.it (Marcello Dalpasso) writes: |> Is there any wizard on the net being so kind to summarize to me the usage of |> named pipes?! The basic advantage is having a filesystem node to use and hence two unrelated processes can be communicating much like any other IPC. It is not like "unamed" pipes which can exist only between related processes (like parent-child). |> |> In particular, I would make something like this: |> |> cp file named-pipe |> |> and get "file" passed to lpr, i.e. named-pipe == | lpr |> Sure it can be done. |> Thanks in advance for any help, preferably via e-mail |> |> -- |> Marcello Dalpasso (e-mail: marcello@deis20.cineca.it) |> D.E.I.S. - Department of Electronics, Computer Science and Systems |> Viale Risorgimento 2, I-40136 Bologna, Italy |> Phone: +39-51-644-3015 (fax: +39-51-644-3073) I am not sure what exactly you trying to achieve but anyway one way to use "named pipes" & lpr together is as follows: 1) assume you have created a named pipe "/tmp/Fifo" using "mknod -p" 2) Lets say your printer name is lp then we can do the following to read from the fifo: cat /tmp/Fifo | /usr/ucb/lpr -P lp Now you will notice that it is waiting for data (remember it is a pipe) 3) now you can copy the data to be printed into the named pipe as you wanted to do (i.e using cp) as shown below: cp /etc/passwd /tmp/Fifo hope this info helps. Yes, you have used named pipes & lpr together. raj 1/22/93
Technical Details
Message-ID:
<1993Jan22.152932.22443@ncrcae.ColumbiaSC.NCR.COM>Path:
arc1-ca.pugleaf.net!sparky!uunet!elroy.jpl.nasa.gov!sdd.hp.com!ncr-sd!ncrcae!grok101.ColumbiaSC.NCR.COM!rajReferences:
<1993Jan22.185326.679@cine88.cineca.it>Show Full Headers
Complete Article Headers
Newsgroups: comp.unix.wizards Path: arc1-ca.pugleaf.net!sparky!uunet!elroy.jpl.nasa.gov!sdd.hp.com!ncr-sd!ncrcae!grok101.ColumbiaSC.NCR.COM!raj From: raj@grok101.ColumbiaSC.NCR.COM () Subject: Re: named pipe Message-ID: <1993Jan22.152932.22443@ncrcae.ColumbiaSC.NCR.COM> Nntp-Posting-Host: grok101.columbiasc.ncr.com Organization: Your Organization Here References: <1993Jan22.185326.679@cine88.cineca.it> Date: Fri, 22 Jan 93 20:29:31 GMT Lines: 47