$ mkfifo ~/session; script -f ~/session
Type the command above in a terminal session on machine1, then on a remote machine2 do:
ssh ip.of.machine1 -l username cat session
Now, whatever is typed/displayed on machine1 terminal session is displayed on machine2!
Including cool stuff like http://www.commandlinefu.com/commands/view/3348/cycle-through-a-256-colour-palette
If terminal sizes are different, output may not always be correctly formatted. Ctrl-D on machine1 to end session
(If you don't have a remote machine to test from, just run 'cat session' in another terminal window to see the effect)
by David Winterbottom (codeinthehole.com)
0sem comentários ainda