Monitor cpu temp shell

this is monitor cpu shell

#!/bin/bash

temp=$(</sys/class/thermal/thermal_zone0/temp)

temp_f=`echo "$temp/1000" | bc -l`
printf "CPU Temp: %.3f°C\n"  $temp_f

the res:

user@starfive:~$ ./cpu_temp.sh 
CPU Temp: 48.614°C
user@starfive:~$ ./cpu_temp.sh 
CPU Temp: 48.556°C
user@starfive:~$ ./cpu_temp.sh 
CPU Temp: 48.672°C
1 Like