Created
February 1, 2012 06:08
-
-
Save hiboma/1715423 to your computer and use it in GitHub Desktop.
macのバッテリーのcapacityを記録する
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
#!/usr/bin/ruby | |
now = Time.now.to_s | |
capacity = `ioreg -l | grep MaxCapacity`.chomp.split(" = ")[1] | |
cyclecount = `ioreg -l | grep CycleCount | grep -v Design`.chomp.split(" = ")[1] | |
puts now+","+capacity+","+cyclecount |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment