some last cleanup of code

This commit is contained in:
inxi-svn 2008-11-06 23:08:34 +00:00
parent fd5ca8a6e2
commit ee0740046f

12
inxi
View file

@ -1268,11 +1268,12 @@ get_networking_data()
nic=gensub(/^[0-9a-f:.]+ [^:]+: (.+)$/,"\\1","g",$0) nic=gensub(/^[0-9a-f:.]+ [^:]+: (.+)$/,"\\1","g",$0)
gsub(/realtek semiconductor/, "Realtek", nic) gsub(/realtek semiconductor/, "Realtek", nic)
gsub(/davicom semiconductor/, "Davicom", nic) gsub(/davicom semiconductor/, "Davicom", nic)
# The doublequotes are necessary because of the pipes in the variable.
gsub(/'"$BAN_LIST_NORMAL"'/, "", nic) gsub(/'"$BAN_LIST_NORMAL"'/, "", nic)
gsub(/,/, " ", nic) gsub(/,/, " ", nic)
gsub(/^ +| +$/, "", nic) gsub(/^ +| +$/, "", nic)
gsub(/ [ \t]+/, " ", nic) gsub(/ [ \t]+/, " ", nic)
# The doublequotes above are necessary because of the pipes in the variable.
eth[nic]++ eth[nic]++
while (getline && !/^$/) { while (getline && !/^$/) {
if (/I\/O/) { if (/I\/O/) {
@ -1320,8 +1321,7 @@ get_partition_data()
get_uptime() get_uptime()
{ {
## note: removing gsub(/ /,"",a); to get get space back in there, goes right before print a ## 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) a = gensub(/^.*up *([^,]*).*$/,"\\1","g",$0)
print a print a
}' ) }' )
@ -1792,11 +1792,9 @@ print_it_out()
local cpu_model="${a_cpu_working[0]}" local cpu_model="${a_cpu_working[0]}"
case "$VERBOSITY_LEVEL" in case "$VERBOSITY_LEVEL" in
0) 0) print_short_data
print_short_data
;; ;;
*) *) lspci_data="$( get_lspci_data )"
lspci_data="$( get_lspci_data )"
print_intro_data print_intro_data
print_cpu_data print_cpu_data
print_gfx_data print_gfx_data