mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +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 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
|
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
|
# 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
|
# also, find the contents of usbid in lsusb and print everything after the 7th word on the
|
||||||
# finally, strip out commas as they will change the driver :)
|
# corresponding line. Finally, strip out commas as they will change the driver :)
|
||||||
# lsusb is not contained in some users paths, hardcode it!
|
|
||||||
usb_id=$( cat $usb_proc_file/usbid )
|
usb_id=$( cat $usb_proc_file/usbid )
|
||||||
usb_data=$( lsusb -v 2>/dev/null | grep "$usb_id" )
|
usb_data=$( lsusb -v 2>/dev/null | grep "$usb_id" )
|
||||||
usb_data=$( gawk '{
|
usb_data=$( gawk '{
|
||||||
gsub( /,/, " ", $0 )
|
gsub( /,/, " ", $0 )
|
||||||
for( i=7; i<NF; i++ ) {
|
for( i=7; i < NF; i++ ) {
|
||||||
printf( $i " " )
|
printf( $i " " )
|
||||||
}
|
}
|
||||||
}' <<< "$usb_data" )
|
}' <<< "$usb_data" )
|
||||||
|
|
Loading…
Reference in a new issue