diff --git a/inxi b/inxi index 3eaab19..9378d22 100755 --- a/inxi +++ b/inxi @@ -3361,8 +3361,9 @@ get_network_advanced_data() if [[ -z $( grep '^usb-' <<< ${a_network_adv_working[4]} ) ]];then working_path="/sys/bus/pci/devices/0000:${a_network_adv_working[4]}" else - usb_vendor=$( cut -d ':' -f 1 <<< ${a_network_adv_working[4]} ) - usb_product=$( cut -d ':' -f 2 <<< ${a_network_adv_working[4]} ) + usb_data=$( cut -d '-' -f 2-4 <<< ${a_network_adv_working[4]} ) + usb_vendor=$( cut -d ':' -f 1 <<< $usb_data ) + usb_product=$( cut -d ':' -f 2 <<< $usb_data ) # this grep returns the path plus the contents of the file, with a colon separator, so slice that off # /sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/idVendor working_path=$( grep -s "$usb_vendor" /sys/devices/pci*/*/usb*/*/*/idVendor | sed -e "s/idVendor:$usb_vendor//" -e '/driver/d' )