made tolower in awk instead of bash for cpu vendor compare

This commit is contained in:
inxi-svn 2008-11-07 20:04:28 +00:00
parent 2122cff7ca
commit 78a2872406

6
inxi
View file

@ -1,7 +1,7 @@
#!/bin/bash
########################################################################
#### Script Name: inxi
#### version: 0.3.30
#### version: 0.3.31
#### Date: November 7 2008
########################################################################
#### inxi is a fork of infobash, the original bash sys info script by locsmif
@ -896,7 +896,7 @@ get_cpu_data()
/vendor_id/ {
gsub(/genuine|authentic/,"",$NF)
cpu[nr, "vendor"] = $NF
cpu[nr, "vendor"] = tolower( $NF )
}
END {
@ -1472,7 +1472,7 @@ print_cpu_data()
# that's why its count is one more than you'd think from cores/cpus alone
# weird hack, probably should be changed
cpu_vendor=$( tr '[A-Z]' '[a-z]' <<< ${a_cpu_working[5]} )
cpu_vendor=${a_cpu_working[5]}
# Strange (and also some expected) behavior encountered.
# If print_screen_output() uses $1 as the parameter to output to the screen,
# then passing "<text1> ${ARR[@]} <text2>"