Use tr on OSX to trim whitespace

This commit is contained in:
Dylan 2016-03-27 14:05:22 +11:00
parent 2edad96936
commit 6296cf7410
1 changed files with 1 additions and 2 deletions

View File

@ -838,8 +838,7 @@ getcpu () {
;; ;;
"Mac OS X") "Mac OS X")
cpu="$(sysctl -n machdep.cpu.brand_string)" cpu="$(sysctl -n machdep.cpu.brand_string | tr -s \ )"
cpu=${cpu//[[:space:]]/ }
cores=$(sysctl -n hw.ncpu) cores=$(sysctl -n hw.ncpu)
;; ;;