mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
Trying awk fix for extra line in asound/versions
This commit is contained in:
parent
d7839c49e1
commit
31c692cc07
21
inxi
21
inxi
|
@ -1,8 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
########################################################################
|
########################################################################
|
||||||
#### Script Name: inxi
|
#### Script Name: inxi
|
||||||
#### version: 0.5.31-b-1-t-1
|
#### version: 0.5.31-b-1-t-2
|
||||||
#### Date: November 13 2008
|
#### Date: November 14 2008
|
||||||
########################################################################
|
########################################################################
|
||||||
#### inxi is a fork of infobash 3.02, the original bash sys info script by locsmif
|
#### 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.
|
#### 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
|
# now we'll get the alsa data if the file exists
|
||||||
if [[ -e /proc/asound/version ]];then
|
if [[ -e /proc/asound/version ]];then
|
||||||
alsa_data=$( gawk '{
|
alsa_data=$( gawk '
|
||||||
{ IGNORECASE=1 }
|
{ IGNORECASE=1 }
|
||||||
# some alsa strings have the build date in (...)
|
# some alsa strings have the build date in (...)
|
||||||
# also remove trailing .
|
# also remove trailing .
|
||||||
gsub( "Driver | [(].*[)]|\.$","",$0 )
|
$0 !~ /compile/ {
|
||||||
gsub(/,/, " ", $0)
|
gsub( "Driver | [(].*[)]|\.$","",$0 )
|
||||||
gsub(/^ +| +$/, "", $0)
|
gsub(/,/, " ", $0)
|
||||||
gsub(/ [ \t]+/, " ", $0)
|
gsub(/^ +| +$/, "", $0)
|
||||||
if ( $0 != "" ){
|
gsub(/ [ \t]+/, " ", $0)
|
||||||
print $0
|
if ( $0 != "" ){
|
||||||
}
|
print $0
|
||||||
|
}
|
||||||
}' /proc/asound/version )
|
}' /proc/asound/version )
|
||||||
fi
|
fi
|
||||||
echo "$alsa_data"
|
echo "$alsa_data"
|
||||||
|
|
Loading…
Reference in a new issue