From c9f910f526824c9e7019b1818d22f9dd132865a3 Mon Sep 17 00:00:00 2001 From: rage311 Date: Wed, 17 Jan 2018 12:52:24 -0700 Subject: [PATCH] Changed OpenBSD temperature extraction from grep/cut to awk --- neofetch | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/neofetch b/neofetch index c57e7754..ccab3ccd 100755 --- a/neofetch +++ b/neofetch @@ -1086,9 +1086,8 @@ get_cpu() { deg="${deg/C}" ;; "OpenBSD"* | "Bitrig"*) - deg_var="$(sysctl hw.sensors | grep -m1 -E 'lm0.temp0|cpu0.temp0' | cut -d'=' -f1)" - deg="$(sysctl -n $deg_var)" - deg="${deg/0 degC}" + deg="$(sysctl hw.sensors | awk -F '=| degC' '/lm0.temp|cpu0.temp/ {print $2; exit}')" + deg="${deg/00/0}" ;; esac ;;