mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-12-24 04:22:32 +00:00
changed to awk command, added netbsd and windows
This commit is contained in:
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user