ulfben

check-temperature.sh

Aug 10th, 2017
107
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2. #check-temperature.sh - prints the value of all thermal sensors
  3. CELCIUS=$'\xc2\xb0'C
  4. for i in /sys/class/thermal/*/temp
  5. do
  6.         fileName="$i"
  7.         value=$(cat "$i")
  8.         value=$(echo "$value/1000.0" | bc) #basic calculator
  9.         printf "%s %.1f%s \\n" "$fileName" "$value" "$CELCIUS"
  10. done
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×