tiny gensub cleanup

This commit is contained in:
Harald Hope 2016-12-24 17:41:32 -08:00
parent d2986cbe8a
commit d60c10b53f

4
inxi
View file

@ -6269,8 +6269,8 @@ get_graphics_card_data()
gsub(/'"$BAN_LIST_ARRAY"'/, " ", $NF)
gsub(/^ +| +$/, "", $NF)
gsub(/ [ \t]+/, " ", $NF)
busId=gensub(/^([0-9a-f:\.]+) (.+)$/,"\\1","g",$1)
trueCard=gensub(/(.*)\.([0-9]+)$/,"\\2","g",busId)
busId=gensub(/^([0-9a-f:\.]+) (.+)$/,"\\1",1,$1)
trueCard=gensub(/(.*)\.([0-9]+)$/,"\\2",1,busId)
if ( trueCard == 0 ) {
print $NF "," busId
}