mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
fixed some output irregularities
This commit is contained in:
parent
d1e0999e7b
commit
fa107bd89a
13
inxi
13
inxi
|
@ -4889,7 +4889,7 @@ print_networking_data()
|
||||||
port_data=" ${C1}at port$port_plural${C2} ${a_network_working[2]}"
|
port_data=" ${C1}at port$port_plural${C2} ${a_network_working[2]}"
|
||||||
fi
|
fi
|
||||||
if [[ -n ${a_network_working[4]} && $B_EXTRA_DATA == 'true' ]];then
|
if [[ -n ${a_network_working[4]} && $B_EXTRA_DATA == 'true' ]];then
|
||||||
pci_bus_id=" ${C1}BusID:${C2} ${a_network_working[4]}"
|
pci_bus_id=" ${C1}busID:${C2} ${a_network_working[4]}"
|
||||||
fi
|
fi
|
||||||
network_data="${C1}Card-$(( $i + 1 ))${C2} ${a_network_working[0]}$driver_data$port_data$pci_bus_id"
|
network_data="${C1}Card-$(( $i + 1 ))${C2} ${a_network_working[0]}$driver_data$port_data$pci_bus_id"
|
||||||
network_data=$( create_print_line " " "$network_data" )
|
network_data=$( create_print_line " " "$network_data" )
|
||||||
|
@ -4917,7 +4917,12 @@ print_network_advanced_data()
|
||||||
oper_state=${a_network_working[6]}
|
oper_state=${a_network_working[6]}
|
||||||
fi
|
fi
|
||||||
if [[ -n ${a_network_working[7]} ]];then
|
if [[ -n ${a_network_working[7]} ]];then
|
||||||
speed="${a_network_working[7]} Mbps"
|
# make sure the value is strictly numeric before appending Mbps
|
||||||
|
if [[ -n $( grep -E '^[0-9\.,]+$' <<< "${a_network_working[7]}" ) ]];then
|
||||||
|
speed="${a_network_working[7]} Mbps"
|
||||||
|
else
|
||||||
|
speed=${a_network_working[7]}
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
if [[ -n ${a_network_working[8]} ]];then
|
if [[ -n ${a_network_working[8]} ]];then
|
||||||
duplex=${a_network_working[8]}
|
duplex=${a_network_working[8]}
|
||||||
|
@ -4929,8 +4934,8 @@ print_network_advanced_data()
|
||||||
mac_id='<irc-filter>'
|
mac_id='<irc-filter>'
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
network_data="${C1}IF:${C2} $if_id ${C1}State:${C2} $oper_state ${C1}Speed:${C2} $speed"
|
network_data="${C1}IF:${C2} $if_id ${C1}state:${C2} $oper_state ${C1}speed:${C2} $speed"
|
||||||
network_data="$network_data ${C1}Duplex:${C2} $duplex ${C1}Mac:${C2} $mac_id"
|
network_data="$network_data ${C1}duplex:${C2} $duplex ${C1}mac:${C2} $mac_id"
|
||||||
network_data=$( create_print_line " " "$network_data" )
|
network_data=$( create_print_line " " "$network_data" )
|
||||||
print_screen_output "$network_data"
|
print_screen_output "$network_data"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue