LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Enterprise (http://www.linuxquestions.org/questions/linux-enterprise-47/)
-   -   Need a shell script to read log file and send mail to relevant recipients. (http://www.linuxquestions.org/questions/linux-enterprise-47/need-a-shell-script-to-read-log-file-and-send-mail-to-relevant-recipients-4175426014/)

gajanan 09-06-2012 03:09 PM

Need a shell script to read log file and send mail to relevant recipients.
 
Hello All,

I have shell script which will read log file in 15 min interval and triggers mail, if it find particular key word.

Now my requirement is every time the reading should start from the point where it stopped last time.

Please help me to know how this can be achieved.

Thank You

Toggan 09-06-2012 03:54 PM

I haven't personally used it, but you might want to take a look at logfile-cat. It seems like it might accomplish what you're looking for. Not sure how it would fit into a shell file though.

chrism01 09-07-2012 01:12 AM

If you don't mind Perl, this module was explicitly designed to handle that situation ie continuously cheeking a growing file and keeping track http://search.cpan.org/~mgrabnar/Fil...0.99.3/Tail.pm


All times are GMT -5. The time now is 03:36 AM.