🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.unix.wizards
2 messages
2 total messages Started by Marcello Dalpasso Fri, 22 Jan 1993 17:53
named pipe
#6931
Author: Marcello Dalpasso
Date: Fri, 22 Jan 1993 17:53
16 lines
1041 bytes
Is there any wizard on the net being so kind to summarize to me the usage of
named pipes?!

In particular, I would make something like this:

cp file named-pipe

and get "file" passed to lpr, i.e. named-pipe == | lpr

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)
Re: named pipe
#6937
Author: raj
Date: Fri, 22 Jan 1993 20:29
47 lines
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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads