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

View file

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