D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
thread-self
/
root
/
usr
/
share
/
doc
/
perl-IO-Compress
/
compress-zlib
/
Filename :
gzgrep
back
Copy
#!/usr/bin/perl use strict ; use warnings ; use Compress::Zlib ; die "Usage: gzgrep pattern file...\n" unless @ARGV >= 2; my $pattern = shift ; my $file ; foreach $file (@ARGV) { my $gz = gzopen($file, "rb") or die "Cannot open $file: $gzerrno\n" ; while ($gz->gzreadline($_) > 0) { print if /$pattern/ ; } die "Error reading from $file: $gzerrno\n" if $gzerrno != Z_STREAM_END ; $gz->gzclose() ; }
Name
Size
Last Modified
Owner
Permissions
Actions
filtdef
0.427
KB
October 13 2019 9:48:19
root
0644
filtinf
0.459
KB
October 13 2019 9:48:19
root
0644
gzcat
0.483
KB
October 13 2019 9:48:19
root
0644
gzgrep
0.452
KB
October 13 2019 9:48:19
root
0644
gzstream
0.307
KB
October 13 2019 9:48:19
root
0644
2017 © D7net | D704T team