How to stream tmux pipe-pane via UDP

旧城冷巷雨未停 提交于 2020-01-13 06:33:58

问题


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:


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"


来源:https://stackoverflow.com/questions/43013576/how-to-stream-tmux-pipe-pane-via-udp

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!