Files
misc/bin/st-temp

12 lines
305 B
Bash
Executable File

#!/bin/sh
CPUTEMP=$(sensors | grep "Package id 0" | awk '{print $4}' | sed s/+// )
# freebsd
# calculate average from all cores (unfinished)
#CORETEMPS=$(hwstat | grep CPU | awk '{print $2}')
# report only core 0 temp for now...
CPUTEMP="$(hwstat | grep CPU | awk 'NR==1 {print $2}')°C"
echo $CPUTEMP