small tweaks

This commit is contained in:
inxi-svn 2008-10-28 07:28:50 +00:00
parent e8780766e1
commit 33c996f682

6
inxi
View file

@ -209,9 +209,9 @@ print_screen_output()
remove_erroneous_chars() remove_erroneous_chars()
{ {
## this removes newline and pipes ## this removes newline and pipes
## RS is input record separator ## RS is input record separator
## gsub is substitute; ## gsub is substitute;
gawk 'BEGIN { RS="" } { gsub(/\n$/,""); ## (newline; end of string) with (nothing) gawk 'BEGIN { RS="" } { gsub(/\n$/,""); ## (newline; end of string) with (nothing)
gsub(/\n/," "); ## (newline) with (space) gsub(/\n/," "); ## (newline) with (space)
gsub(/^ *| *$/, ""); ## (pipe char) with (nothing) gsub(/^ *| *$/, ""); ## (pipe char) with (nothing)