Named pipes...

Named pipes...

Post by bflvi.. » Wed, 16 Jun 1999 04:00:00



Hi,

How do I use named pipes in unix? Any links?

thanks,

Vijay.

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.

 
 
 

Named pipes...

Post by Bruce Woodwar » Wed, 16 Jun 1999 04:00:00


As an example....

mknod pipe p
cat file > pipe
cat pipe | while read LINE
do
echo $LINE
done


>Hi,

>How do I use named pipes in unix? Any links?

>thanks,

>Vijay.

>Sent via Deja.com http://www.deja.com/
>Share what you know. Learn what you don't.


 
 
 

Named pipes...

Post by Barry Margoli » Wed, 16 Jun 1999 04:00:00




>As an example....

>mknod pipe p
>cat file > pipe
>cat pipe | while read LINE
>do
>echo $LINE
>done

You forgot the '&' at the end of the 'cat file > pipe' line.  Otherwise,
the script will stop at that line (opening a pipe for writing hangs until
another process opens it for reading, and vice versa) and never get to the
part that reads.

Also, your "cat pipe" is a UUOC.

--

GTE Internetworking, Powered by BBN, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.

 
 
 

Named pipes...

Post by avers.. » Wed, 16 Jun 1999 04:00:00




> >mknod pipe p

On some systems, this is called `mkfifo'.

Alex

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.

 
 
 

Named pipes...

Post by Harald Kirs » Wed, 16 Jun 1999 04:00:00


<I_saw_it_first_mode>


> As an example....

> mknod pipe p
> cat file > pipe
> cat pipe | while read LINE
> do
> echo $LINE
> done

mknod pipe p
cat file > pipe
while read LINE
do
echo $LINE
done <pipe

</I_saw_it_first_mode> :-)

Harald Kirsch

--
---------------------+------------------+--------------------------


              gegen Punktfilitis hilft nur `chmod u-w ~'

 
 
 

Named pipes...

Post by Bruce Woodwar » Thu, 17 Jun 1999 04:00:00


I didn't intend that to sequence of command to be a script. In the future,
if I don't have time to say it all I won't bother..




>>As an example....

>>mknod pipe p
>>cat file > pipe
>>cat pipe | while read LINE
>>do
>>echo $LINE
>>done

>You forgot the '&' at the end of the 'cat file > pipe' line.  Otherwise,
>the script will stop at that line (opening a pipe for writing hangs until
>another process opens it for reading, and vice versa) and never get to the
>part that reads.

>Also, your "cat pipe" is a UUOC.

>--

>GTE Internetworking, Powered by BBN, Burlington, MA
>*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
>Please DON'T copy followups to me -- I'll assume it wasn't posted to the

group.