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

14
inxi
View file

@ -60,6 +60,11 @@
#### Booleans should start with b_ or B_ and state clearly what is being tested #### Booleans should start with b_ or B_ and state clearly what is being tested
#### Arrays should start with a_ or A_ #### Arrays should start with a_ or A_
#### All functions should follow standard naming, ie, verb adjective noun, get_cpu_data #### 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 #### TESTING FLAGS
#### inxi supports advanced testing triggers to do various things, using -! <arg> #### inxi supports advanced testing triggers to do various things, using -! <arg>
@ -1750,7 +1755,12 @@ get_module_version_number()
if [[ -n $( which modinfo ) ]];then if [[ -n $( which modinfo ) ]];then
module_version=$( modinfo $1 | gawk ' module_version=$( modinfo $1 | gawk '
BEGIN { IGNORECASE=1 } BEGIN { IGNORECASE=1 }
/^version/ {print $2} /^version/ {
gsub(/,/, " ", $2)
gsub(/^ +| +$/, "", $2)
gsub(/ [ \t]+/, " ", $2)
print $2
}
' ) ' )
fi fi
@ -2506,7 +2516,7 @@ print_module_version()
done done
if [[ -n $module_versions ]];then if [[ -n $module_versions ]];then
echo " ${C1}v:${C2} $module_versions" echo " ${C1}v:${C2}$module_versions"
fi fi
} }