| Server IP : 108.167.183.253 / Your IP : 216.73.216.38 Web Server : Apache System : Linux gator4209.hostgator.com 5.14.0-687.39.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Aug 18 06:09:16 EDT 2026 x86_64 User : raghunath ( 2558) PHP Version : 8.3.33 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 ;
}