Skip to content

Instantly share code, notes, and snippets.

@SamRothCA
Created October 30, 2014 20:44
Show Gist options
  • Save SamRothCA/8dd389b6cd1286b09e4e to your computer and use it in GitHub Desktop.
Save SamRothCA/8dd389b6cd1286b09e4e to your computer and use it in GitHub Desktop.
Temperature Readings
/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;
@qbektrix
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment