Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'See battery percentage in Terminal and GeekTool' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
See battery percentage in Terminal and GeekTool
Authored by: googoo on Feb 01, '10 10:26:30AM
I used the following to add a linebreak after the command output:

ioreg -l | grep -i capacity | tr '\n' ' | ' | awk '{printf("%.2f%%\n", $10/$5 * 100)}'

I added a \n after the last % in the printf command.

-Mark



[ Reply to This | # ]