Google Cloud CLI (gcloud) · Output and filtering
Capture a single value
Print a bare field, suited to scripts.
PROJECT=$(gcloud config get-value project)
Official Google Cloud CLI (gcloud) documentation
More output and filtering commands
All output and filtering commands · Google Cloud CLI (gcloud) cheatsheet