mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
fine tuning, get rid of extra grep in loop
This commit is contained in:
parent
dd5a96c38b
commit
7c5fedd3aa
9
inxi
9
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
|
||||
|
|
Loading…
Reference in a new issue