changed to awk command, added netbsd and windows
This commit is contained in:
parent
890d44c518
commit
26c04cf753
1 changed files with 4 additions and 1 deletions
5
neofetch
5
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
|
||||
|
||||
|
|
Loading…
Reference in a new issue