Skip to content

Instantly share code, notes, and snippets.

@DrJume
Created September 26, 2022 11:36
Show Gist options
  • Save DrJume/1e0ed8dc8734356595127873eb6f6a46 to your computer and use it in GitHub Desktop.
Save DrJume/1e0ed8dc8734356595127873eb6f6a46 to your computer and use it in GitHub Desktop.
#!/bin/bash
pmset -g custom | sed -nE -e '/Battery Power/,/AC Power/p' | sed -e '1d' -e '$d' | sort > battery.pmset
pmset -g custom | sed -nE -e '/AC Power/,$p' | sed '1d' | sort > ac.pmset
sdiff <(echo "Battery Power:"; cat battery.pmset) <(echo "AC Power:"; cat ac.pmset)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment