diff --git a/inxi b/inxi index 0c27608..c6b4a39 100755 --- a/inxi +++ b/inxi @@ -1265,7 +1265,6 @@ get_cmdline() get_audio_data() { local i='' alsa_data='' alsa_driver='' device_count='' usb_proc_file='' - local usb_data='' usb_data_id='' IFS=$'\n' # this first step handles the drivers for cases where the second step fails to find one @@ -1387,19 +1386,12 @@ get_audio_data() # also, find the contents of usbid in lsusb and print everything after the 7th word on the corresponding line # finally, strip out commas as they will change the driver :) # lsusb is not contained in some users paths, hardcode it! - usb_data_id=$( cat $usb_proc_file/usbid ) - usb_data=$( lsusb -v 2>/dev/null | grep <<< $usb_data_id ) - usb_data=$( sed 's/,/ /' <<< $usb_data ) # replace with gawk but use for now - usb_data=$( gawk '{ - for( i=7; i < NF; i++ ) { - printf($i " ") - } - printf "\n" - }' <<< $usb_data ) + A_AUDIO_DATA=( "${A_AUDIO_DATA[@]}" \ + "$( lsusb -v 2>/dev/null |\ + grep $( cat $usb_proc_file/usbid ) |\ + gawk '{ for( i=7; i