-
-
Save FedericoCeratto/8042933 to your computer and use it in GitHub Desktop.
Revisions
-
FedericoCeratto revised this gist
Dec 19, 2013 . 1 changed file with 2 additions and 13 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,20 +1,12 @@ # ssh-multi # Based on http://linuxpixies.blogspot.jp/2011/06/tmux-copy-mode-and-how-to-control.html # a script to ssh multiple servers over multiple tmux panes multimux() { readarray hosts < "$1" tmux new-window "ssh $1@${hosts[0]}" unset hosts[0]; for i in "${hosts[@]}"; do @@ -26,6 +18,3 @@ starttmux() { } -
olvesh revised this gist
Dec 6, 2013 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -6,7 +6,7 @@ # a script to ssh multiple servers over multiple tmux panes starttmux() { if [ -z "$HOSTS" ]; then echo -n "Please provide of list of hosts separated by spaces [ENTER]: " read HOSTS @@ -15,7 +15,7 @@ starttmux(user) { local hosts=( $HOSTS ) tmux new-window "ssh $1@${hosts[0]}" unset hosts[0]; for i in "${hosts[@]}"; do tmux split-window -h "ssh $i" -
olvesh revised this gist
Dec 6, 2013 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -6,16 +6,16 @@ # a script to ssh multiple servers over multiple tmux panes starttmux(user) { if [ -z "$HOSTS" ]; then echo -n "Please provide of list of hosts separated by spaces [ENTER]: " read HOSTS fi local hosts=( $HOSTS ) tmux new-window "ssh ${user}@${hosts[0]}" unset hosts[0]; for i in "${hosts[@]}"; do tmux split-window -h "ssh $i" -
dmytro created this gist
Oct 31, 2012 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,31 @@ #!/bin/bash # ssh-multi # D.Kovalov # Based on http://linuxpixies.blogspot.jp/2011/06/tmux-copy-mode-and-how-to-control.html # a script to ssh multiple servers over multiple tmux panes starttmux() { if [ -z "$HOSTS" ]; then echo -n "Please provide of list of hosts separated by spaces [ENTER]: " read HOSTS fi local hosts=( $HOSTS ) tmux new-window "ssh ${hosts[0]}" unset hosts[0]; for i in "${hosts[@]}"; do tmux split-window -h "ssh $i" tmux select-layout tiled > /dev/null done tmux select-pane -t 0 tmux set-window-option synchronize-panes on > /dev/null } HOSTS=${HOSTS:=$*} starttmux