Skip to content

Instantly share code, notes, and snippets.

@chris-skud
Created June 9, 2015 18:37
Show Gist options
  • Save chris-skud/8a87bbe6be515c0d2783 to your computer and use it in GitHub Desktop.
Save chris-skud/8a87bbe6be515c0d2783 to your computer and use it in GitHub Desktop.
shell curl parse json collection
for json_val in $(curl -H "Content-Type: application/json; charset=utf-8" -H "Authorization: Bearer <secret>" https://thingthatreturnsjson | ./bin/JSON.sh |
egrep '^\[\d*,"id"\]\s\d*' | cut -f 2); do echo $json_val; sleep 3; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment