Last active
August 29, 2015 14:25
-
-
Save shkm/7b36f8abba5e612b414d to your computer and use it in GitHub Desktop.
Suspend or halt all running Vagrant boxes.
This file contains 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
# Suspend | |
vsall() { | |
vagrant global-status --prune | grep running | awk '{system("vagrant suspend "$1)}' | |
} | |
# Halt | |
vhall() { | |
vagrant global-status --prune | grep running | awk '{system("vagrant halt "$1)}' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Won't work too well if a box has "running" in the name ;-).