small tweak in output space handling

This commit is contained in:
inxi-svn 2008-11-23 18:10:30 +00:00
parent 3599dbd7bc
commit 1614e5f2ea

12
inxi
View file

@ -60,6 +60,11 @@
#### Booleans should start with b_ or B_ and state clearly what is being tested
#### Arrays should start with a_ or A_
#### All functions should follow standard naming, ie, verb adjective noun, get_cpu_data
####
#### SPECIAL NOTES:
#### The color variable ${C2} must always be followed by a space unless you know what
#### character is going to be next for certain. Otherwise irc color codes can be accidentally
#### activated or altered.
########################################################################
#### TESTING FLAGS
#### inxi supports advanced testing triggers to do various things, using -! <arg>
@ -1750,7 +1755,12 @@ get_module_version_number()
if [[ -n $( which modinfo ) ]];then
module_version=$( modinfo $1 | gawk '
BEGIN { IGNORECASE=1 }
/^version/ {print $2}
/^version/ {
gsub(/,/, " ", $2)
gsub(/^ +| +$/, "", $2)
gsub(/ [ \t]+/, " ", $2)
print $2
}
' )
fi