Last active
September 18, 2016 22:57
-
-
Save biera/cbd24ac4c4df73e43e95 to your computer and use it in GitHub Desktop.
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
vagrant global-status | awk '$3 == "running"{print $4}' | xargs -I '{}' sh -c 'cd "$1" && vagrant halt' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey @biera, this does not seem to work anymore on Vagrant 1.8.5. I tried changing the script slightly but not advanced enough on command line to know what's really going on with this one liner.