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
--------------------------------------------------------------------------
NPU $$LH1234
bla
blub
? FORMAT
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
#****************************
# Line number call for
# Search String
#****************************
my @suche = "";
my $pointer = '1';
#
while (defined(my $line = $fh->getline())) {
chomp($line);
#
$suche [$pointer] = $line;
#
if ($line =~ /^$String/) {
my $Zeile = $fh->input_line_number;
my $read = $fh->read(my $buffer, 32*1024);
my $string_before = $pointer+1;
#
if ( $string_before == '25' ) {
$string_before = '1';
}
#
open(LOG, ">>result_10.txt") or die $!;
open(LOG2, ">>result_11.txt") or die $!;
#
my $ii = $string_before;
for (my $i =1; $i <= 25; $i++){
print LOG "$suche[$ii]\n";
$ii++;
if ( $ii == '25' ) {
$ii = 0;
}
}
#
print LOG2 "\nFound Message = $String\nin ZipFile = $Zip_File\nLogfile = $fh2\n";
close LOG;
close LOG2
} # if
$pointer++;
if ( $pointer == '25' ) {
$pointer = 1;
}
} # while
$fh->close();
}
}
}
#
#
#****************************
# End of Script
#****************************
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
--------------------------------------------------------------------------
NPA $$LH1234
bla
blub
? FORMAT