by cgabios · 11y ago · 0 comments
ioreg -l -n AppleSmartBattery -r | awk '/MaxCapacity/{mc=$3};/DesignCapacity/{dc=$3};END{print 100*mc/dc}'