Skip to content

Instantly share code, notes, and snippets.

@rmchale
Created November 26, 2019 20:44
Show Gist options
  • Save rmchale/4d5cf26a83724b6ea24bb36e7020328d to your computer and use it in GitHub Desktop.
Save rmchale/4d5cf26a83724b6ea24bb36e7020328d to your computer and use it in GitHub Desktop.
gcedown
for i in `gcloud compute instances list --project=rmchale-1093 |grep -i mchale |grep RUNNING |awk '{ print $1 }'`
do
zone=$(gcloud compute instances list --project=rmchale-1093 |grep -i $i |awk '{ print $2 }')
yes Y | gcloud compute instances delete $i --zone=$zone --project=rmchale-1093
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment