Created
February 23, 2015 05:54
-
-
Save ebarendt/428963c21c749fe50f6d to your computer and use it in GitHub Desktop.
Split a tmux window into multiple based on a chef search
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
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