2022-05-20 00:06:39 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
check_sensor=$(sensors | grep "edge:" 2> /dev/null)
|
|
|
|
if [ -z "${check_sensor}" ] ; then
|
|
|
|
check_sensor=$(sensors | grep "junction:" 2> /dev/null)
|
|
|
|
if [ -z "${check_sensor}" ] ; then
|
|
|
|
echo "N/A°C"
|
|
|
|
else
|
2025-05-11 10:23:12 +02:00
|
|
|
TEMP=$(sensors | grep 'Package id 0:\|junction' | grep ':[ ]*+[0-9]*.[0-9]*°C' -o | grep '+[0-9]*.[0-9]*°C' -o)
|
2022-05-20 00:06:39 +02:00
|
|
|
echo "$TEMP"
|
|
|
|
fi
|
|
|
|
else
|
2025-05-11 10:23:12 +02:00
|
|
|
TEMP=$(sensors | grep 'Package id 0:\|edge' | grep ':[ ]*+[0-9]*.[0-9]*°C' -o | grep '+[0-9]*.[0-9]*°C' -o)
|
2022-05-20 00:06:39 +02:00
|
|
|
echo "$TEMP"
|
|
|
|
fi
|