Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disappearing coprocess output

Status
Not open for further replies.

d9720267

Programmer
Nov 29, 2003
1
GB
Hi,

I am trying to run a program called netcat ( as a coprocess. As far as I know, the following command should start it a as a coprocess:

netcat -l -p 80 |&

(The -l -p 80 tells it to listen to port 80)

Then if I want to get a line of its output, the following should do it:

read -p line
print $line

However, thae read command just hangs, even when I know netcat is outputting something. Where is it outputting to, and how can I get at it?

Thanks for your help!

Doug
 
you may stop the coprocess and see any output of the process. If it has a output file, then try:

exec 3< output_file
read -u3 line
print $line

tikual
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top