How to stream tmux pipe-pane via UDP
Asked Answered
P

1

1

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.

Photosphere answered 25/3, 2017 at 7:6 Comment(0)
P
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"
Photosphere answered 25/3, 2017 at 9:32 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.