X-Git-Url: https://git.xandkar.net/?a=blobdiff_plain;f=x2%2Fsrc%2Fbash%2Fexe%2Fkhatus_sensor_temperature.sh;fp=x2%2Fsrc%2Fbash%2Fexe%2Fkhatus_sensor_temperature.sh;h=321c8d8b54a309cdb62d57c68e029893b45b9f37;hb=499c58a269a00e031302938b5a8f006f23aae451;hp=0000000000000000000000000000000000000000;hpb=4c703fadbdc17d1753d16841582636598f862416;p=khatus.git diff --git a/x2/src/bash/exe/khatus_sensor_temperature.sh b/x2/src/bash/exe/khatus_sensor_temperature.sh new file mode 100644 index 0000000..321c8d8 --- /dev/null +++ b/x2/src/bash/exe/khatus_sensor_temperature.sh @@ -0,0 +1,15 @@ +#! /bin/sh + +set -e + +thermal_zone="$1" + +awk ' + BEGIN { + OFS = msg_fs ? msg_fs : "|" + Kfs = key_fs ? key_fs : ":" + } + + {print("temp_c", $1 / 1000)} +' \ +"/sys/class/thermal/thermal_zone${thermal_zone}/temp"