From 26c04cf7538f2f202d31ff2241bda885c9f91f43 Mon Sep 17 00:00:00 2001 From: Andrew Titmuss Date: Tue, 15 Mar 2016 18:24:12 +1100 Subject: [PATCH] changed to awk command, added netbsd and windows --- neofetch | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 9152697f..6205c858 100755 --- a/neofetch +++ b/neofetch @@ -851,7 +851,7 @@ getcpu () { cpu="$cpu @ ${speed}GHz" # Get cpu cores - cores=$(nproc) + cores=$(awk -F ': ' '/siblings/ {printf $2; exit}' /proc/cpuinfo) ;; "Mac OS X") @@ -897,6 +897,9 @@ getcpu () { "NetBSD"*) speed=$((speed / 10000)) ;; "Windows"*) speed=$((speed / 100000)) ;; esac + + # Get cpu cores + cores=$(awk -F ': ' '/siblings/ {printf $2; exit}' /proc/cpuinfo) ;; esac