diff --git a/inxi b/inxi index 0236e52..14a9cf7 100755 --- a/inxi +++ b/inxi @@ -1,7 +1,7 @@ #!/bin/bash ######################################################################## #### Script Name: inxi -#### version: 0.5.7 +#### version: 0.5.8 #### Date: November 10 2008 ######################################################################## #### inxi is a fork of infobash, the original bash sys info script by locsmif @@ -886,6 +886,15 @@ get_audio_data() gsub(/ [ \t]+/," ",$NF) print $NF }' ) ) + + # c=gensub( /^ *vendor: (.+) +model: (.+) +rev:.*$/, "\\2", "g", a[i] ) + # in case of failure of first check do this instead + if [[ ${#A_AUDIO_DATA[@]} -eq 0 && -f /proc/asound/cards ]];then + A_AUDIO_DATA=( $( gawk -F ']: ' '{ + card=gensub( /^(.+)( - )(.+)$/, "\\3", 1, $2 ) + print card + }' /proc/asound/cards ) ) + fi IFS="$ORIGINAL_IFS" # handle cases where card detection fails, like in PS3, where lspci gives no output, or headless boxes..