mirror of
https://github.com/smxi/inxi.git
synced 2024-11-16 16:21:39 +00:00
a few cosmetic code tweaks to 1.0.3, no version change
This commit is contained in:
parent
c0c4a4c480
commit
7fd903ca68
7
inxi
7
inxi
|
@ -1399,14 +1399,13 @@ get_audio_data()
|
|||
# if lsusb exists, the file is a symlink, and contains an important usb exclusive file: continue
|
||||
if [[ -n $( which lsusb ) && -L $usb_proc_file && -e $usb_proc_file/usbid ]]; then
|
||||
# send error messages of lsusb to /dev/null as it will display a bunch if not a super user
|
||||
# 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!
|
||||
# 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 :)
|
||||
usb_id=$( cat $usb_proc_file/usbid )
|
||||
usb_data=$( lsusb -v 2>/dev/null | grep "$usb_id" )
|
||||
usb_data=$( gawk '{
|
||||
gsub( /,/, " ", $0 )
|
||||
for( i=7; i<NF; i++ ) {
|
||||
for( i=7; i < NF; i++ ) {
|
||||
printf( $i " " )
|
||||
}
|
||||
}' <<< "$usb_data" )
|
||||
|
|
Loading…
Reference in a new issue