Skip to content

Instantly share code, notes, and snippets.

@inducer
Created March 29, 2016 16:23
Show Gist options
  • Save inducer/e8b011eecdba32807283 to your computer and use it in GitHub Desktop.
Save inducer/e8b011eecdba32807283 to your computer and use it in GitHub Desktop.
Run a command across the machine shop
#! /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