D
D
delkov2017-01-07 17:27:43
linux
delkov, 2017-01-07 17:27:43

How to redirect output to 2 servers, linux+netcat?

Good day!
There is a server, and two programs, each of which connects to it and does something.
I want to run them at the same time, for this I need to duplicate the data from the server (create a new server).
So you can create one:

nc 192.168.1.170 10001 | nc -l -p 14888

For two tried:
nc 192.168.1.170 10001 | tee nc -lp 14889 |nc -l -p 14888

but it didn't work out. tell me how to arrange for two?
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
Wexter, 2017-01-07
@delkov

nc 192.168.1.170 10001 | tee >(nc -l -p 14888) >(nc -lp 14889)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question