From 65eecef4edf0e04f3cd3219692b57481b5320e71 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Fri, 25 Mar 2016 22:44:30 +0100 Subject: Corrected a bug while parsing the CPU name. --- sysinfo.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysinfo.sh b/sysinfo.sh index 0588f06..5c239a5 100755 --- a/sysinfo.sh +++ b/sysinfo.sh @@ -19,7 +19,7 @@ swap_used=`echo ${swap_total} ${swap_free} | awk '{printf "%d",$1-$2;}'` #--- [ CPU ] -------------------------- cpu=`cat /proc/cpuinfo | grep "model name" | head -n 1 | sed 's/^.*: //'` -if [ x"${cpu}" == "x" ]; then +if [ -z "${cpu}" ]; then # fallback cpu=`uname -p` fi -- cgit v1.2.3