Commit 26c04cf7 authored by Andrew Titmuss's avatar Andrew Titmuss

changed to awk command, added netbsd and windows

parent 890d44c5
...@@ -851,7 +851,7 @@ getcpu () { ...@@ -851,7 +851,7 @@ getcpu () {
cpu="$cpu @ ${speed}GHz" cpu="$cpu @ ${speed}GHz"
# Get cpu cores # Get cpu cores
cores=$(nproc) cores=$(awk -F ': ' '/siblings/ {printf $2; exit}' /proc/cpuinfo)
;; ;;
"Mac OS X") "Mac OS X")
...@@ -897,6 +897,9 @@ getcpu () { ...@@ -897,6 +897,9 @@ getcpu () {
"NetBSD"*) speed=$((speed / 10000)) ;; "NetBSD"*) speed=$((speed / 10000)) ;;
"Windows"*) speed=$((speed / 100000)) ;; "Windows"*) speed=$((speed / 100000)) ;;
esac esac
# Get cpu cores
cores=$(awk -F ': ' '/siblings/ {printf $2; exit}' /proc/cpuinfo)
;; ;;
esac esac
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment