would something like this work? I am assuming you are on a system where zcat works on .Z and .gz files. For other compressions use corresponding utility and pipe it to Perl.
cheers
SK Update: Here is a snippet. Sorry I couldn't get the file reading and matching in one line :(
#!/usr/local/bin/perl -w my $myfile = "test.gz"; open(IN,"zcat $myfile|") or die "Cannot open file: $myfile\n"; while (<IN>) { print ($_) if /mymatch/; }
In reply to Re: Searching within compressed files
by sk
in thread Searching within compressed files
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |