Created
March 7, 2022 13:33
-
-
Save Egor3f/ab6444505b600debabdb135ed0d65d0a to your computer and use it in GitHub Desktop.
Raspberry pi temperature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
while true; do | |
cur_second=`date +"%-S"` | |
if (( $cur_second == 0 )); then | |
minute=$cur_minute | |
echo -n $'\n'`date +"%d.%m.%y %H:%M"`: | |
elif (( $cur_second % 10 == 0 )); then | |
echo -n ' |' | |
fi | |
temp=`cat /sys/class/thermal/thermal_zone0/temp` | |
echo -n ' '${temp:0:2} | |
sleep 1 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment