From: Darold Gilles Date: Sun, 3 Mar 2013 09:51:58 +0000 (+0100) Subject: Add missing zcat command control in previous patch. X-Git-Tag: v3.2~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c640a74c9c4f7b21b53df896d69f7584e8d5a199;p=pgbadger Add missing zcat command control in previous patch. --- diff --git a/pgbadger b/pgbadger index 0e4192b..4f63ff8 100755 --- a/pgbadger +++ b/pgbadger @@ -110,7 +110,8 @@ $| = 1; my $JQGRAPH = 1; # Command line options -my $zcat = 'gunzip -c'; +my $zcat_cmd = 'gunzip -c'; +my $zcat = $zcat_cmd; my $bzcat = 'bunzip2 -c'; my $ucat = 'unzip -p'; my $gzip_uncompress_size = "gunzip -l %f | grep -E '^\\s*[0-9]+' | awk '{print \$2}'"; @@ -6093,9 +6094,9 @@ sub get_log_file } else { my $uncompress = $zcat; - if (($logf =~ /\.bz2/i) && ($zcat =~ /^zcat$/)) { + if (($logf =~ /\.bz2/i) && ($zcat =~ /^$zcat_cmd$/)) { $uncompress = $bzcat; - } elsif (($logf =~ /\.zip/i) && ($zcat =~ /^zcat$/)) { + } elsif (($logf =~ /\.zip/i) && ($zcat =~ /^$zcat_cmd$/)) { $uncompress = $ucat; } &logmsg('DEBUG', "Compressed log file, will use command: $uncompress \"$logf\"");