#!/bin/sh # Display CPU temperature for zone in /sys/class/thermal/thermal_zone*/temp; do [ -f "$zone" ] || continue temp=$(cat "$zone" 2>/dev/null) if [ -n "$temp" ] && [ "$temp" -gt 0 ]; then printf "TEMP %d°C" $((temp / 1000)) exit 0 fi done printf "N/A"