Created
January 18, 2012 23:03
-
-
Save otterley/1636372 to your computer and use it in GitHub Desktop.
tmux fanout
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Usage: tmux-cssh user1@host1 user2@host2 host3 host4 host5 host6 [...] | |
SESSION=cssh-$$ | |
tmux new-session -d -s $SESSION "exec ssh $1" | |
shift | |
for host in "$@"; do | |
tmux split-window -t $SESSION "exec ssh $host" | |
tmux select-layout -t $SESSION tiled >/dev/null | |
done | |
tmux set-window-option -t $SESSION status off >/dev/null | |
tmux set-window-option -t $SESSION synchronize-panes on >/dev/null | |
exec tmux attach -t $SESSION |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment