Last Updated: August 07, 2022
·
5.613K
· mroach_

macOS: Get battery percentage from command line

When at 94% battery remaining for example:

$ pmset -g batt | grep -Eo "\d+%" | cut -d% -f1
=> 94