Re: named-pipe in a loop

From: Taylor, David (DTaylor@WBMI.COM)
Date: Thu Oct 09 2003 - 18:01:15 EDT


That only worked for the first thing echoed to the pipe then, the
infinite loop spun.

 

The following does what I need:

 

while true; do

   cat < mypipe | read LINE

   echo $LINE

done

 

Thanks for the help!

 

David

 

-----Original Message-----
From: Bruce Zimmer [mailto:b.r.zimmer@WORLDNET.ATT.NET]
Sent: Thursday, October 09, 2003 4:46 PM
To: aix-l@Princeton.EDU
Subject: Re: named-pipe in a loop

 

cat /dir/named/pipe | while true; do

    read line

    echo "$line"

done

 

Will read and subsequently echo the data coming down from the named
pipe.

 

Bruce Zimmer

Central Data Systems

(248) 615-4644 (direct)

(248) 320-1175 (cell)

bzimmer@centraldata.com

-----Original Message-----
From: IBM AIX Discussion List [mailto:aix-l@Princeton.EDU] On Behalf Of
Taylor, David
Sent: Thursday, October 09, 2003 4:58 PM
To: aix-l@Princeton.EDU
Subject: named-pipe in a loop

 

I would like to create an infinite loop, in a shell script, based upon
listening to named pipe. Does anyone know how to do this?

 

TIA

 

David

**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************

**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:17:16 EDT