Results 1 to 1 of 1
I am trying to write to a file on one host, and have the data transfer to a named pipe on another host, to be used by a program. Using ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 02-22-2011 #1Just Joined!
- Join Date
- Feb 2011
- Posts
- 1
Help with netcat & named pipes
I am trying to write to a file on one host, and have the data transfer to a named pipe on another host, to be used by a program. Using netcat, I have this working, but for only 1 character at a time.
This is what I am doing so far:
Host A (192.168.0.1):
Host B (192.168.0.2):Code:mkfifo fifo nc -lp 9000 | while read data; do echo $data >fifo; done
Host B:Code:mkfifo fifo tail -f /dev/null | nc 192.168.0.1 9000 <fifo
Host A:Code:for x in `seq 1 10`; do echo $x >fifo; done
Doing this, I can only pass 1 character, and then netcat stops forwarding across the pipe. Testing it without named pipes works fine, and testing this on a single host works fine as well. Everything is using netcat 1.10.Code:tail -f fifo 1 [no more output]
Any thoughts?
Thanks in advance.


Reply With Quote
