linux - Writing output from a socket -
i have 2 machines , b.
in machine a, do
echo "hello world" > /dev/tcp/{bs_ip}/12345
in machine b, how write script runs in background, listens on port 12345, , prints whatever receives port 12345 stdout?
btw both machines running red hat enterprise linux 4.
thanks
you can using netcat:
nc -l -p 123456
if want able handle multiple connections have use loop.
Comments
Post a Comment