|< 1 2 >| | 12 Einträge, 2 Seiten |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
use Archive::Zip;
use Archive::Zip::MemberRead;
use File::Glob ':glob';
#****************************
# Search String
#****************************
print "\n\nPls. Enter Search String!\n\n";
chomp ($String = <STDIN>);
print "\nSearching for String $String ........\n\nPls. wait!\n\n";
#****************************
# Search over all ZIP Files
#****************************
@Zip_File = glob ("*.zip");
for $Zip_File (@Zip_File){
#****************************
#
#****************************
$zip = new Archive::Zip($Zip_File);
#****************************
# Files to be read
#****************************
@file2 = qw (PIXX_SRV_LF5.LOG
PIXX_SRV_LF5.LOG.1
);
for $file2 (@file2){
#****************************
# Open Zip Archive for
# reading Files
#****************************
$fh = new Archive::Zip::MemberRead($zip, $file2);
#****************************
# Line number call for
# Search String
#****************************
$zeile = 0;
while (defined($line = $fh->getline())) {
chomp($line);
++$zeile;
if ($line =~ /$String/) {
print "\nFound in Line $zeile: Search String\n$line\nin ZipFile $Zip_File\nLog File $file2\n\n";
}
}
$fh->close();
}
}
print "\n\nSearch for String $String Done!";
1
2
3
4
5
6
for my $Zip_File (@Zip_File){
...
my $zip = new Archive::Zip($Zip_File);
...
while (defined(my $line = $fh->getline())) {
...
|< 1 2 >| | 12 Einträge, 2 Seiten |