Skip to content

Instantly share code, notes, and snippets.

@obradovic
Created September 11, 2018 16:32
Show Gist options
  • Save obradovic/1b317cb7d26f3dce7b411b790da2edce to your computer and use it in GitHub Desktop.
Save obradovic/1b317cb7d26f3dce7b411b790da2edce to your computer and use it in GitHub Desktop.
Sum GCP cost numbers from BigQuery json
cat x.json | jq ".[] | .cost" | tr -d '"' | awk '{ total += $1 } END { print total }'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment