From c1dff27d83f9aa8bd4c58e91931402ed929d7e56 Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Mon, 1 Feb 2010 18:32:15 +0000 Subject: [PATCH] fixed bug with pardus pisi output, stripping out colors --- inxi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/inxi b/inxi index 8357a48..a46a7db 100755 --- a/inxi +++ b/inxi @@ -1,7 +1,7 @@ #!/bin/bash ######################################################################## #### Script Name: inxi -#### version: 1.3.8 +#### version: 1.3.9 #### Date: February 1 2010 ######################################################################## #### SPECIAL THANKS @@ -3251,10 +3251,10 @@ $repo_data_working" do repo_line=$( gawk ' { - # need to dump leading/trailing spaces and change [,] to (, ) for irc output + # need to dump leading/trailing spaces and clear out color codes for irc output sub(/^[[:space:]]+|[[:space:]]+$/,"",$0) - gsub(/\[/,"(",$0) - gsub(/\]/,")",$0) +# gsub(/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]/,"",$0) # leaving this pattern in case need it + gsub(/\[([0-9];)?[0-9]+m/,"",$0) print $0 }' <<< $repo_line ) if [[ -n $( grep '://' <<< $repo_line ) ]];then