Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env ruby
- require 'json'
- if ARGV.length != 1
- puts "Usage: cohai attribute . For e.g. - cohai kernel.release"
- exit 1
- end
- ohai_output = JSON.parse(ohai)
- ARGV[0].split(".").each do |key|
- ohai_output = ohai_output[key]
- end
- puts ohai_output
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement