How to stream tmux pipe-pane via UDP

2019-04-16 15:21发布

I'm trying to simultaneously save the output from a tmux pane to file and stream it using netcat.

What works:

tmux pipe-pane -o -t "server" "tee -a '/home/csgoserverp/test.txt'"
echo -n "Hello World" | tee -a '/home/me/text.txt' | nc -4u -w1 0.0.0.0 9999

What does not work:

tmux pipe-pane -o -t "server" "nc -4u -w1 0.0.0.0 9999"
tmux pipe-pane -o -t "server" "tee -a '/home/me/test.txt' | nc -4u -w1 0.0.0.0 9999"

Any help would be appreciated.

1条回答
smile是对你的礼貌
2楼-- · 2019-04-16 15:42

I read somewhere that ncat is better than netcat and for reasons unknown using ncat works:

tmux pipe-pane -t "server" "tee -a '/home/csgoserverp/test.txt' | ncat -4u -w1 0.0.0.0 9999"
查看更多
登录 后发表回答