mirror of
https://github.com/smxi/inxi.git
synced 2025-01-31 10:02:18 +00:00
fixed a few small errors
This commit is contained in:
parent
84d1fb5ab0
commit
f8e193103d
6
inxi
6
inxi
|
@ -301,7 +301,8 @@ remove_erroneous_chars()
|
||||||
{
|
{
|
||||||
## RS is input record separator
|
## RS is input record separator
|
||||||
## gsub is substitute;
|
## gsub is substitute;
|
||||||
gawk 'BEGIN { RS="" } {
|
gawk '
|
||||||
|
BEGIN { RS="" } {
|
||||||
gsub(/\n$/,"") ## (newline; end of string) with (nothing)
|
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)
|
||||||
|
@ -964,8 +965,7 @@ get_distro_data()
|
||||||
# Debian pure should fall through here
|
# Debian pure should fall through here
|
||||||
distro_file="issue"
|
distro_file="issue"
|
||||||
distro=$( gawk '
|
distro=$( gawk '
|
||||||
BEGIN
|
BEGIN { RS="" } {
|
||||||
{ RS="" } {
|
|
||||||
gsub(/\\[a-z]/, "")
|
gsub(/\\[a-z]/, "")
|
||||||
gsub(/,/, " ")
|
gsub(/,/, " ")
|
||||||
gsub(/^ +| +$/, "")
|
gsub(/^ +| +$/, "")
|
||||||
|
|
Loading…
Reference in a new issue