#!/usr/local/bin/perl
#Log Scanner for ACRserve
#Version 1.3
#February, 1999
print "PC Backup Log Scanner for ACRserve Ver 1.3";
print "\nCreated by Olaf 2/1/99";
print "\n\nWhat log do you want to scan? ";
$file = ;
open(LOGFILE, "$file");
open(OUTFILE, ">>failed.txt");
$key = "Start";
$error = "E8511";
print OUTFILE "\n...............................\n";
while(){
$aline = $_;
($first, $rest)= split(' ', $aline);
if($first eq $key){
($s, $t, $date)= split(' ', $aline);
}
if($first eq $error){
($r0, $r1, $r2, $r3, $r4, $r5, $r6, $r7, $r8)= split(' ', $aline);
($p1, $more)= split('\(',$r8);
chop ($more); chop ($more);
print OUTFILE "\n$more";
print "\n$more";
}
}
print OUTFILE "\nagents were missed on $date\n";
print "\nagents were missed on $date\n";
close(ERRORLOG);
close(LOGFILE);
|