From ee0740046fc2fa81aba4e5cee41a75d390789439 Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Thu, 6 Nov 2008 23:08:34 +0000 Subject: [PATCH] some last cleanup of code --- inxi | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/inxi b/inxi index ae6416c..1f3f008 100755 --- a/inxi +++ b/inxi @@ -1268,11 +1268,12 @@ get_networking_data() nic=gensub(/^[0-9a-f:.]+ [^:]+: (.+)$/,"\\1","g",$0) gsub(/realtek semiconductor/, "Realtek", nic) gsub(/davicom semiconductor/, "Davicom", nic) + # The doublequotes are necessary because of the pipes in the variable. gsub(/'"$BAN_LIST_NORMAL"'/, "", nic) gsub(/,/, " ", nic) gsub(/^ +| +$/, "", nic) gsub(/ [ \t]+/, " ", nic) - # The doublequotes above are necessary because of the pipes in the variable. + eth[nic]++ while (getline && !/^$/) { if (/I\/O/) { @@ -1320,8 +1321,7 @@ get_partition_data() get_uptime() { ## note: removing gsub(/ /,"",a); to get get space back in there, goes right before print a - echo $( uptime | gawk ' - { + echo $( uptime | gawk '{ a = gensub(/^.*up *([^,]*).*$/,"\\1","g",$0) print a }' ) @@ -1792,11 +1792,9 @@ print_it_out() local cpu_model="${a_cpu_working[0]}" case "$VERBOSITY_LEVEL" in - 0) - print_short_data + 0) print_short_data ;; - *) - lspci_data="$( get_lspci_data )" + *) lspci_data="$( get_lspci_data )" print_intro_data print_cpu_data print_gfx_data