Created
May 10, 2014 14:46
-
-
Save YanhaoYang/f844819bbb31b9a90aee to your computer and use it in GitHub Desktop.
A cron job warning when battery is low
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*/2 * * * * if [[ `pmset -g batt | awk -F'[^0-9]*' '{ print $3 }'` -lt 20 ]];then say "Battery low";fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment