#!/usr/bin/env bash # Timestamps and logs the thermal condition to ~/logs_custom # Best is to run this script like `watch -n5 -d 'bash log_thermal.sh'` if [ ! -d ~/logs_custom ] then mkdir ~/logs_custom fi (echo -n "$(date +%F_%T%z) "; cat /sys/class/thermal/thermal_zone0/temp) | tee --append ~/logs_custom/thermal_"$(date +%F)".log