Laddo wrote:
>
> Hi all
Hello,
> I have a log file which is generated by backup script and i am writing a
> perl script to sort the log so as to prepare it to put into mysql
> database and iam having a problem in doing that.
>
> my log file is like this (I have written line numbers for clar
you might want to try:
#!/usr/bin/perl -w
use strict;
my $i = 1;
my $min = -1;
while(<>){
my($n1,$d1,$b1) =
/^INCREMENTAL\s+OF\s+(.+?)\s+.*?ON\s+(.+?)\s+.+\s+(\d+)$/i;
$i++ if($b1 < $min);
$min = $b1;
print "\"$d1\",\"TAPE $i\",\"$n1\",\"$b1\"\n";
}
david
Laddo
ARTS AT At block 103204
INCREMENTAL OF local ON 2002-08-28 FROM 08/27/02 STARTS AT At
block 103216.
INCREMENTAL OF Hyper-G ON 2002-08-28 FROM 08/27/02 STARTS AT At
block 103236.
INCREMENTAL OF submissions ON 2002-08-28 FROM 08/27/02 STARTS AT At
block 104278.
INCREMENTAL OF src ON
On Wed, Aug 28, 2002 at 10:59:13AM +1200, LADDO wrote:
> Hi all
>
> I have a log file which is generated by backup script and i am writing a
> perl script to sort the log so as to prepare it to put into mysql
> database and iam having a problem in doing that.
[ snip ]
> i can do it with aw
Hi all
I have a log file which is generated by backup script and i am writing a
perl script to sort the log so as to prepare it to put into mysql
database and iam having a problem in doing that.
my log file is like this (I have written line numbers for clarity only )
1 INCREMENTAL OF staf