diff --git a/inxi b/inxi index 9165021..9638a0c 100755 --- a/inxi +++ b/inxi @@ -4889,7 +4889,7 @@ print_networking_data() port_data=" ${C1}at port$port_plural${C2} ${a_network_working[2]}" fi 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 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" ) @@ -4917,7 +4917,12 @@ print_network_advanced_data() oper_state=${a_network_working[6]} fi 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 if [[ -n ${a_network_working[8]} ]];then duplex=${a_network_working[8]} @@ -4929,8 +4934,8 @@ print_network_advanced_data() mac_id='' fi fi - 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="${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=$( create_print_line " " "$network_data" ) print_screen_output "$network_data" fi