From c0d50a4a26f13dcf37b48b49b8e86fd3a939d159 Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Fri, 5 Feb 2010 23:04:02 +0000 Subject: [PATCH] (Change Version) fixed another small bug that made the print for busid use wrong data, forgot to clean , from original array data. --- inxi | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/inxi b/inxi index f26bb28..44ac1cc 100755 --- a/inxi +++ b/inxi @@ -1,7 +1,7 @@ #!/bin/bash ######################################################################## #### Script Name: inxi -#### version: 1.3.10 +#### version: 1.3.11 #### Date: February 5 2010 ######################################################################## #### SPECIAL THANKS @@ -1706,11 +1706,12 @@ get_audio_data() # loop until you get to the end of the data block while (getline && !/^$/) { + gsub( /,/, "", $0 ) if (/driver in use/) { - drivers[audioCard] = drivers[audioCard] gensub(/(.*): (.*)/,"\\2","g",$0) "" + drivers[audioCard] = drivers[audioCard] gensub( /(.*): (.*)/ ,"\\2", "g" ,$0 ) "" } else if (/kernel modules:/) { - modules[audioCard] = modules[audioCard] gensub(/(.*): (.*)/,"\\2","g",$0) "" + modules[audioCard] = modules[audioCard] gensub( /(.*): (.*)/ ,"\\2" ,"g" ,$0 ) "" } else if (/I\/O/) { portsTemp = gensub(/\t*I\/O ports at (.*) \[.*\]/,"\\1","g",$0) @@ -2820,14 +2821,15 @@ get_networking_data() # I do not understand why incrementing a string index makes sense? eth[nic]++ while ( getline && !/^$/ ) { + gsub(/,/, "", $0) if ( /I\/O/ ) { ports[nic] = ports[nic] $4 " " } if ( /driver in use/ ) { - drivers[nic] = drivers[nic] gensub(/(.*): (.*)/,"\\2","g",$0) "" + drivers[nic] = drivers[nic] gensub( /(.*): (.*)/ ,"\\2" ,"g" ,$0 ) "" } else if ( /kernel modules/ ) { - modules[nic] = modules[nic] gensub(/(.*): (.*)/,"\\2","g",$0) "" + modules[nic] = modules[nic] gensub( /(.*): (.*)/ ,"\\2" ,"g" ,$0 ) "" } } }