| Server IP : 208.109.34.209 / Your IP : 216.73.217.134 Web Server : Apache System : Linux 209.34.109.208.host.secureserver.net 5.14.0-687.29.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Jul 23 16:18:48 EDT 2026 x86_64 User : oceanproject ( 1012) PHP Version : 8.1.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/share/doc/perl-IO-Compress-Lzma/ |
Upload File : |
#!/usr/bin/perl
use strict ;
use warnings ;
use IO::Uncompress::UnLzma qw($UnLzmaError);
die "Usage: gzgrep pattern [file...]\n"
unless @ARGV >= 1;
my $pattern = shift ;
my $file ;
@ARGV = '-' unless @ARGV ;
foreach $file (@ARGV) {
my $gz = new IO::Uncompress::UnLzma $file
or die "Cannot uncompress $file: $UnLzmaError\n" ;
while (<$gz>) {
print if /$pattern/ ;
}
die "Error reading from $file: $UnLzmaError\n"
if $UnLzmaError ;
}