blob: 2d54d39e13159247f64255c7e3db6f33d2c2872e (
plain) (
tree)
|
|
#!/usr/bin/env sh
total_temp=0
i=0
for temp_file in /sys/class/hwmon/hwmon*/temp*_input
do
temp="$(cat "${temp_file}")"
if [ "${temp}" != "0" ]
then
total_temp="$(( ${total_temp} + ${temp} ))"
i="$(( ${i} + 1 ))"
fi
done
echo -n "$(( ${total_temp} / ${i} / 1000 ))" °C
|