From 9f28c025bb70b94e442244c749404175394f6fa2 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 13 Jun 2016 22:33:34 +1000 Subject: [PATCH] Condense awk command --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 26e2ccf0..79756962 100755 --- a/neofetch +++ b/neofetch @@ -1173,7 +1173,7 @@ getcpu_usage () { esac fi - cpu_usage="$(ps aux | awk 'BEGIN { sum = 0 } { sum += $3 }; END { print sum }')" + cpu_usage="$(ps aux | awk 'BEGIN {sum=0} {sum+=$3 }; END {print sum}')" cpu_usage="$((${cpu_usage/\.*} / ${cores:-1}))" ;; esac