Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2015
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. require 'json'
  2. ohai_json = `ohai`
  3. ohai_hash = JSON.parse(ohai_json)
  4.  
  5. cores = ohai_hash["core"]["cores"]
  6.  
  7. cores.each do |core|
  8. if core.nil? then
  9. else
  10. puts core
  11. end
  12. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement