Created
April 27, 2011 09:28
-
-
Save boecko/943975 to your computer and use it in GitHub Desktop.
JSON Decoding on cmdline (ruby)
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 url | ruby -e "require 'rubygems'; require 'json'; puts JSON.pretty_generate(JSON[STDIN.read]);" | |
cat file | ruby -e "require 'rubygems'; require 'json'; puts JSON[STDIN.read]['serverStatus']['uptime'];" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment