Uncompress gzipped files
This commit is contained in:
parent
e8c34ce1b5
commit
92125c7c4e
|
@ -4,7 +4,12 @@ use warnings;
|
|||
|
||||
open my $tsfh, '>', "graph_used.tsv";
|
||||
for my $fn (glob("/var/log/simba/ca.*")) {
|
||||
open (my $fh, '<', $fn);
|
||||
my $fh;
|
||||
if ($fn =~ /\.gz$/) {
|
||||
open($fh, '-|', "zcat", $fn);
|
||||
} else {
|
||||
open ($fh, '<', $fn);
|
||||
}
|
||||
my %free;
|
||||
while (<$fh>) {
|
||||
if (m{(....-..-..T..:..:..[-+]....) .*: considering base /backup/(.*) \(est. (\d+) bytes\)}) {
|
||||
|
|
Loading…
Reference in New Issue