#!/bin/sh temp() { find /sys/class/thermal -type l -name 'thermal_zone*' | \ while read -r zone do printf "%s °C " "$(( $(cat ${zone}/temp) / 1000 ))" done } bat="BAT $(cat /sys/class/power_supply/BAT*/capacity | tr '\n' ' ')" time="$(date '+KW %W %a %Y-%m-%d %H:%M')" echo "| $(temp)| ${bat}| ${time} |"