Last active
August 29, 2015 14:15
-
-
Save cgswong/57b59cc58f5c61ee0171 to your computer and use it in GitHub Desktop.
JSON bash parser
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -sL http://172.17.8.101:8500/v1/catalog/service/elasticsearch-9200 | awk -v RS=',"' -F: '/^ServicePort/ {print $2}' | sed "s/}]//g" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment