Skip to content

Instantly share code, notes, and snippets.

@JoshuaEstes JoshuaEstes/Vagrant.rst
Last active Aug 29, 2015

Embed
What would you like to do?
Useful Oneliners

Vagrant

# Gettting the state of the machine, ie Is it poweroff or running

vagrant status --machine-readable | awk -F',' '$3 == "state" { print $4 }'

Can be used in a script like so

if test "poweroff" == $(vagrant status --machine-readable | awk -F',' '$3 == "state" { print $4 }'); then echo "yup"; fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.