N
Nene
Hello,
I have a script that runs every 5 minutes and greps for errors in a
log file. Througout the day, the log file gets bigger and bigger. Is
there a way to open the file from a specific line number. My objective
is that when the scripts runs, it will will get the last line number
of the file, when it runs again in 5 minutes, I want it to start from
the last line from the last time the script ran.
I checked FAQ, they had articles similar to what I'm looking for but
according to FAQ "How do I change, delete, or insert a line in a file,
or append to the beginning of a file?" It said, "Perl doesn't provide
random access to lines (especially since the record input separator,
$/ , is mutable)..."
Any help will be greatly appreciated.
Nene
I have a script that runs every 5 minutes and greps for errors in a
log file. Througout the day, the log file gets bigger and bigger. Is
there a way to open the file from a specific line number. My objective
is that when the scripts runs, it will will get the last line number
of the file, when it runs again in 5 minutes, I want it to start from
the last line from the last time the script ran.
I checked FAQ, they had articles similar to what I'm looking for but
according to FAQ "How do I change, delete, or insert a line in a file,
or append to the beginning of a file?" It said, "Perl doesn't provide
random access to lines (especially since the record input separator,
$/ , is mutable)..."
Any help will be greatly appreciated.
Nene