Fix empty cpu still printing

This commit is contained in:
GaugeK committed 2020-08-20 23:19:43 +10:00
1 parent 579e6b54fb
commit c95bed41eb
1 file changed
+2 -2
+2 -2
View File
@@ -62,7 +62,7 @@ mem="$(( $2 / 1000 ))MB"
## Processor ## Processor
while read -r line; do while read -r line; do
case $line in case $line in
vendor_id*) vendor="${line##*: }";; vendor_id*) vendor="${line##*: } ";;
model\ name*) cpu="${line##*: }"; break;; model\ name*) cpu="${line##*: }"; break;;
esac esac
done < /proc/cpuinfo done < /proc/cpuinfo
@@ -133,7 +133,7 @@ for i in $info; do
wm) print wm "$wm";; wm) print wm "$wm";;
up) print up "$up";; up) print up "$up";;
gtk) print gtk "${gtk# }";; gtk) print gtk "${gtk# }";;
cpu) print cpu "$vendor $cpu";; cpu) print cpu "$vendor$cpu";;
mem) print mem "$mem";; mem) print mem "$mem";;
host) print host "$model";; host) print host "$model";;
kern) print kern "$kernel";; kern) print kern "$kernel";;