3 ms·
Tmux has pipe-pane, and it has -I and -O to go both directions. It does require some gyrations to get around the fact that it logs everything (the command itse
by tyingq 7y ago
Tmux has pipe-pane, and it has -I and -O to go both directions.
It does require some gyrations to get around the fact that it logs everything (the command itself, terminal control, etc), and not just what's output by the command. Here's a quick and dirty example:
a) Start a tmux session to a remote host
b) On the local host, run this (assuming session 0):
$ tmux pipe-pane -o -t0 "tail -n +2 | col -b | base64 -d > ~/output"
$ tmux send-keys -t0 "base64 /some/file && read" Enter
$ tmux pipe-pane -t0
$ tmux send-keys -t0 Enter
You should now have ~/output on the local host, which is identical to /some/file on the remote.
- tjoff 7y agoThank you, that is great! Will certainly play around with that :)