0
nc -q -1 -lk -p 8080 < pipe | nc example.com 8080 > pipe
This is the command I'm working on. It mostly works fine, but sometimes connection to example.com is reset due to lower signal etc. and it stops working. How could I make it reconnect ? I did not see any option about reconnecting on error, but I believe this is possible to achieve with bash. Am I wrong ?
Your command looks broken. Since
pipe
is used for both< pipe
and> pipe
, it will be truncated before any data is read from it. – janos – 2017-02-12T09:53:14.040it works as I expected. how could it be broken ? pipe is a fifo – None – 2017-02-12T09:59:28.563