From 5085b8bb48dac7084d2a7f837c9c342173ee07fb Mon Sep 17 00:00:00 2001 From: mmcwilliams Date: Sat, 23 May 2020 00:12:28 -0400 Subject: [PATCH] Add linux cpu functionality to eponymous script --- scripts/cpu.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/cpu.sh b/scripts/cpu.sh index fae7633..5fb9b3d 100644 --- a/scripts/cpu.sh +++ b/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