Skip to content

Instantly share code, notes, and snippets.

@miceno
Created December 27, 2017 12:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save miceno/c2ecb6312504737a705b85a82d669f16 to your computer and use it in GitHub Desktop.
Save miceno/c2ecb6312504737a705b85a82d669f16 to your computer and use it in GitHub Desktop.
Extract number value from json
echo '{"count":7363,"_shards":{"total":1,"successful":1,"failed":0}}' | sed -e 's/^.*"count":\([^,]*\),.*$/\1/'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment