From 31c692cc07066fea4d3aadd4572b3daba0a372fc Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Fri, 14 Nov 2008 20:12:56 +0000 Subject: [PATCH] Trying awk fix for extra line in asound/versions --- inxi | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/inxi b/inxi index aa2976b..a463d06 100755 --- a/inxi +++ b/inxi @@ -1,8 +1,8 @@ #!/bin/bash ######################################################################## #### Script Name: inxi -#### version: 0.5.31-b-1-t-1 -#### Date: November 13 2008 +#### version: 0.5.31-b-1-t-2 +#### Date: November 14 2008 ######################################################################## #### inxi is a fork of infobash 3.02, the original bash sys info script by locsmif #### As time permits functionality improvements and recoding will occur. @@ -1050,17 +1050,18 @@ get_audio_alsa_data() # now we'll get the alsa data if the file exists if [[ -e /proc/asound/version ]];then - alsa_data=$( gawk '{ + alsa_data=$( gawk ' { IGNORECASE=1 } # some alsa strings have the build date in (...) # also remove trailing . - gsub( "Driver | [(].*[)]|\.$","",$0 ) - gsub(/,/, " ", $0) - gsub(/^ +| +$/, "", $0) - gsub(/ [ \t]+/, " ", $0) - if ( $0 != "" ){ - print $0 - } + $0 !~ /compile/ { + gsub( "Driver | [(].*[)]|\.$","",$0 ) + gsub(/,/, " ", $0) + gsub(/^ +| +$/, "", $0) + gsub(/ [ \t]+/, " ", $0) + if ( $0 != "" ){ + print $0 + } }' /proc/asound/version ) fi echo "$alsa_data"