Last Updated: October 25, 2023
·
8.278K
· 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