Advertisement
Guest User

Untitled

a guest
Apr 27th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. #!/usr/bin/env ruby
  2. require 'json'
  3. if ARGV.length != 1
  4. puts "Usage: cohai attribute . For e.g. - cohai kernel.release"
  5. exit 1
  6. end
  7. ohai_output = JSON.parse(ohai)
  8. ARGV[0].split(".").each do |key|
  9. ohai_output = ohai_output[key]
  10. end
  11. puts ohai_output
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement