From c557fa4e355b925b11ca0cca3b5dcf19380fab1f Mon Sep 17 00:00:00 2001 From: Keith Nash Date: Fri, 24 Mar 2017 12:57:44 -0500 Subject: [PATCH] Update get_hdd_temp.sh --- get_hdd_temp.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/get_hdd_temp.sh b/get_hdd_temp.sh index 788625f..f4d216b 100644 --- a/get_hdd_temp.sh +++ b/get_hdd_temp.sh @@ -44,12 +44,12 @@ printf "=== CPU (%s) ===\n" "${cores}" cores=$((cores - 1)) for core in $(seq 0 $cores); do - temp="$(sysctl -a | grep "cpu.${core}.temp" | cut -c24-25 | tr -d "\n")" - if [ "$temp" -lt 0 ]; then - temp="--N/A--" - else - temp="${temp}C" - fi + temp="$(sysctl -a | grep "cpu.${core}.temp" | cut -c24-25 | tr -d "\n")" + if [ "$temp" -lt 0 ]; then + temp="--N/A--" + else + temp="${temp}C" + fi printf "CPU %s: %4s\n" "$core" "$temp" done