added Fahrenheit to thermal.
This commit is contained in:
+7
-4
@@ -1,11 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
name=$(</sys/class/thermal/thermal_zone0/type)
|
||||
temp=$(</sys/class/thermal/thermal_zone0/temp)
|
||||
temp="$((temp/1000)).$((temp/100%10))"
|
||||
echo "${name}: ${temp} C"
|
||||
mc=$(</sys/class/thermal/thermal_zone0/temp)
|
||||
|
||||
c=`echo "scale=1 ; $mc / 1000.0" | bc -l`
|
||||
f=`echo "scale=1 ; $c * 9 / 5 + 32" | bc -l`
|
||||
|
||||
echo "${name}: ${c} C ($f F)"
|
||||
|
||||
if (( "$#" > "0" )); then
|
||||
exit `echo "$temp >= $1" | bc`
|
||||
exit `echo "$c >= $1" | bc`
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user