tweaked some output for awk cpu detections for cell

This commit is contained in:
inxi-svn 2008-11-04 04:45:02 +00:00
parent 8ca79e2118
commit 64a9f179e6

12
inxi
View file

@ -1,7 +1,7 @@
#!/bin/bash
########################################################################
#### Script Name: inxi
#### version: 0.3.15
#### version: 0.3.16
#### Date: November 3 2008
########################################################################
#### inxi is a fork of infobash, the original bash sys info script by locsmif
@ -773,7 +773,11 @@ get_cpu_data()
# Therefore PATCH to use [ \t]+ when TESTING!
/^processor\t+:/ { nr = $NF }
/^model name|^cpu\t+:/ { cpu[nr, "model"] = $NF }
/^model name|^cpu\t+:/ {
modelName = $NF
gsub(/,/," ",modelName)
cpu[nr, "model"] = modelName
}
/^cpu MHz|^clock\t+:/ {
if (!min) {
@ -1294,8 +1298,10 @@ calculate_multicore_data()
# handle weird error cases where it's not a number
if [ -n "$( egrep '^[0-9\.,]+$' <<< $string_number )" ];then
string_number=$( echo $string_number $2 | awk '{total = $1*$2; print total}' )
elif [ "$string_number" == '' ];then
string_number='Not Available'
else
string_number="Error: string_number=$string_number "
string_number="Error data:$string_number "
fi
echo "$string_number$string_data"
}