Created
March 29, 2016 16:23
-
-
Save inducer/e8b011eecdba32807283 to your computer and use it in GitHub Desktop.
Run a command across the machine shop
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 characters
#! /bin/bash | |
if [[ -z "$TMUX" ]]; then | |
echo "This wants to be run inside of tmux" | |
exit 1 | |
fi | |
tmux set-option set-remain-on-exit on | |
for machine in porter stout quail pheas; do | |
tmux neww -n $machine ssh -t root@$machine "$@" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment