Created
October 30, 2014 20:44
-
-
Save SamRothCA/8dd389b6cd1286b09e4e to your computer and use it in GitHub Desktop.
Temperature Readings
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
/Applications/TemperatureMonitor.app/Contents/MacOS/tempmonitor -a -l -f | | |
while read reading; do | |
set -- $reading; | |
temperature="${@:$[$#-1]:1}"; | |
sensor="${@:2:$[$#-3]}"; | |
sensor="${sensor:0:$[${#sensor}-1]}"; | |
sensor="${sensor//(}"; | |
sensor="${sensor//)}"; | |
sensor="$(echo "${sensor:0:32}" | tr '[:lower:]' '[:upper:]')"; | |
short=$[32-${#sensor}]; | |
i=0; | |
while ((i++ < short)); do sensor="$sensor "; done; | |
echo "$sensor"$' \e[35m'"${temperature}°F"$'\e[0m'; | |
done; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am running OS X 10.10.2 Yosemite, but Temperature Monitor 4.98 support for OS X 10.9 Mavericks is not recommended. Can I install it anyway of is there any other app?
http://www.bresink.com/osx/LegacyProducts.html