Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #check-temperature.sh - prints the value of all thermal sensors
- CELCIUS=$'\xc2\xb0'C
- for i in /sys/class/thermal/*/temp
- do
- fileName="$i"
- value=$(cat "$i")
- value=$(echo "$value/1000.0" | bc) #basic calculator
- printf "%s %.1f%s \\n" "$fileName" "$value" "$CELCIUS"
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement