Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'json'
- ohai_json = `ohai`
- ohai_hash = JSON.parse(ohai_json)
- cores = ohai_hash["core"]["cores"]
- cores.each do |core|
- if core.nil? then
- else
- puts core
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement