diff --git a/inxi b/inxi index 5fa9154..db31c0e 100755 --- a/inxi +++ b/inxi @@ -2128,7 +2128,7 @@ get_audio_data() if ( card != "" ){ print card","driver } - }' $FILE_ASOUND_DEVICE ) ) + }' $FILE_ASOUND_DEVICE ) ) fi # alsa usb detection by damentz @@ -3264,7 +3264,7 @@ get_networking_data() { eval $LOGFS - local b_usb_networking='false' + local b_usb_networking='false' id_string='' IFS=$'\n' A_NETWORK_DATA=( $( echo "$Lspci_Data" | gawk ' @@ -3349,8 +3349,9 @@ get_networking_data() lsusb_data="$( $lsusb_path 2>/dev/null )" for needle in $USB_NETWORK_SEARCH do - if [[ -n $( grep -isE "$needle" <<< "$lsusb_data" | grep -Eisv '(bluetooth| hub|keyboard|mouse|printer| ps2|reader|scan|storage)' ) ]];then - card_data=$( grep -isE "$needle" <<< "$lsusb_data" ) + id_string=$( grep -isE "$needle" <<< "$lsusb_data" | grep -Eisv '(bluetooth| hub|keyboard|mouse|printer| ps2|reader|scan|storage)' ) + if [[ -n $id_string ]];then + card_data=$id_string break fi done