Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 6 lines (5 sloc) 188 Bytes
#!/bin/sh
ioreg -l | \
grep -E '(Max|Current)Capacity' | \
cut -d= -f2 | \
perl -e '@b=<STDIN>;printf"%.1f%%\n",100*$b[1]/$b[0]'