Hi, I want to erase a log file while it is parsing it with sec. The problem that i got it is time procedures.
A line enter to the rule(input) and it is erased from file.At the same time another lines comes from the input to the rule and these lines are not erased because the rule is still processing the previous line. Is it possible to save the line that it is processing and the following or 2 next lines that sec is going to proccess for being erased later? _____________________________________________________________________________ ptype = RegExp continue = Takenext pattern = (.*) desc=- action = eval %ret ( \ my($filename)='$+{_inputsrc}';\ my($bus)='$0';\ my($idx) =0;\ if($filename !~ m/synthetic/i)\ {\ open my $handle, '<', $filename;chomp(my @lines = <$handle>);close $handle;\ $idx = List::Util::first { $lines[$_] eq $bus } 0..$#lines;\ splice @lines, $idx, 1;\ open my $handle, '>', $filename;\ print $handle join ("\n", @lines);\ close $handle;\ }\ ); _______________________________________________________________________________ Thank you!. Regards.
------------------------------------------------------------------------------
_______________________________________________ Simple-evcorr-users mailing list Simple-evcorr-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/simple-evcorr-users