From 82889a7f15b88bb8e2800416dd70c0259d29acd1 Mon Sep 17 00:00:00 2001 From: zebra Date: Fri, 5 Jul 2024 18:25:46 -0700 Subject: [PATCH] This is my reminder to stop using OpenAI to pretty print my fekking code --- poweredge-cputemp.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/poweredge-cputemp.sh b/poweredge-cputemp.sh index 33d2cc0..e40818e 100644 --- a/poweredge-cputemp.sh +++ b/poweredge-cputemp.sh @@ -8,8 +8,8 @@ cpu1_temps=$(echo "$sensors_output" | awk '/coretemp-isa-0000/ {p=1} /coretemp-i cpu2_temps=$(echo "$sensors_output" | awk '/coretemp-isa-0001/ {p=1} /i350bb-pci-0103/ {p=0} p' | awk '/Core/ {print $3}' | sort -n | tail -n 1) # Strip out the + and degree symbol from temperatures -cpu1_temps_clean=$(echo "$cpu1_temps" | tr -d '+°' | awk -F '.' '{print $1}') -cpu2_temps_clean=$(echo "$cpu2_temps" | tr -d '+°' | awk -F '.' '{print $1}') +cpu1_temp_value=$(echo "$cpu1_temps" | tr -d '+°' | awk -F '.' '{print $1}') +cpu2_temp_value=$(echo "$cpu2_temps" | tr -d '+°' | awk -F '.' '{print $1}') @@ -27,5 +27,5 @@ else fi # Format the final output -echo "CPU0: ${cpu1_temps_clean} | CPU1: ${cpu2_temps_clean}" +echo "CPU0: ${cpu1_temp_value} | CPU1: ${cpu2_temp_value}"