Add linux cpu functionality to eponymous script

main
mmcwilliams 3 years ago
parent 4e959df57b
commit 5085b8bb48
  1. 2
      scripts/cpu.sh

@ -1,7 +1,7 @@
#!/bin/bash
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
CPU=-1
CPU=`cat /proc/cpuinfo | grep "model name" | head -n 1 | awk '{for (i=4; i<=NF; i++) print $i}'`
elif [[ "$OSTYPE" == "darwin"* ]]; then
CPU=`sysctl -a | grep machdep.cpu.brand_string | awk '{for (i=2; i<=NF; i++) print $i}'`
else

Loading…
Cancel
Save