#!/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
Comments
0 B
|0 👍
/0 👎
0 B
|👍
/👎