|
techAdmin
Back to top
Status: Site Admin Joined: 26 Sep 2003 Posts: 1711 Location: East Coast, West Coast? I know it's one of them. |
This looks like it can patch the ugly driver extractor that inxi audio is using now
:: Code :: lspci -nnv | gawk '{IGNORECASE = 1}; /multimedia|audio/, /^$/ {if ( $0 ~ /kernel driver/)driver = $0;if ( $0 ~ /kernel module/)module = $0} END { print "driver: " driver " module: " module}'
driver: Kernel driver in use: Intel ICH module: Kernel modules: snd-intel8x0 and then some gensub fine tuning: :: Code :: lspci -nnv | gawk '{IGNORECASE = 1}; /multimedia|audio/, /^$/ {if ( $0 ~ /kernel driver/)driver = gensub( /(.*): (.*)/,"\\2","g",$0);if ( $0 ~ /kernel module/)module = gensub(/(.*): (.*)/,"\\2","g",$0)} END { print "driver: " driver " module: " module}'
# this gives us: driver: Intel ICH module: snd-intel8x0 and to translate this to human readable: :: Code :: lspci -nnv | gawk '{
IGNORECASE = 1} /multimedia|audio/, /^$/ { if ( $0 ~ /kernel driver/){ driver = gensub( /(.*): (.*)/,"\\2","g",$0) } if ( $0 ~ /kernel module/){ module = gensub(/(.*): (.*)/,"\\2","g",$0) } } END { print "driver: " driver " module: " module }' driver: Intel ICH module: snd-intel8x0 |
|||||
|
All times are GMT - 8 Hours
|
||||||
Contact Us
Hosting: Pair Networks: 0.044
Forum Software © 2001–2009 phpBB
techForum Style © 2003–2009 techpatterns.com
info
Hosting: Pair Networks: 0.044
Forum Software © 2001–2009 phpBB
techForum Style © 2003–2009 techpatterns.com
info