Skip to content

Instantly share code, notes, and snippets.

@shved270189
Last active August 29, 2015 14:08
Show Gist options
  • Save shved270189/db47002557e7441d15a3 to your computer and use it in GitHub Desktop.
Save shved270189/db47002557e7441d15a3 to your computer and use it in GitHub Desktop.
#!/bin/sh
c_koef=1000;
while read line; do
if [ "$line" = "${line%#*}" -a "$line" ]; then
echo "CPU temperature is:"
awk 'BEGIN{print '"$line"'/'"$c_koef"'}'
fi
done < /sys/class/thermal/thermal_zone0/temp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment