Skip to content

Instantly share code, notes, and snippets.

@ebarendt
Created February 23, 2015 05:54
Show Gist options
  • Save ebarendt/428963c21c749fe50f6d to your computer and use it in GitHub Desktop.
Save ebarendt/428963c21c749fe50f6d to your computer and use it in GitHub Desktop.
Split a tmux window into multiple based on a chef search
function ec2split {
chefsearch $*
for x in `knife search -a ec2.public_hostname "$CHEF_SEARCH" | grep public_hostname | awk '{print $2}'`; do
tmux split-window "ssh ericb@$x"
tmux select-layout tiled
done
tmux kill-pane -t 1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment