LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices

Reply
 
Search this Thread
Old 09-06-2012, 03:09 PM   #1
gajanan
LQ Newbie
 
Registered: Oct 2006
Location: bangalore
Posts: 11

Rep: Reputation: 0
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
 
Old 09-06-2012, 03:54 PM   #2
Toggan
Member
 
Registered: Oct 2011
Distribution: CentOS 5.9
Posts: 39

Rep: Reputation: 4
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.
 
Old 09-07-2012, 01:12 AM   #3
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,261

Rep: Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Shell script to monitor the log file & kill the process if log is not updating. milu_k Programming 5 07-19-2012 08:23 AM
[SOLVED] I need a shell script to delete files wich location should be read from a log file jorgemarmo Programming 24 07-02-2010 07:07 AM
[SOLVED] Linux base shell script with java which check the disk space and send mail to my id dhirendrs Linux - Newbie 2 06-14-2010 11:50 AM
Relevant Log File for Apache 2 Crashing icarusfall Linux - Server 1 06-25-2007 03:59 PM
Cannot send mail due to exim log file permission zahoo Linux - General 3 11-03-2005 11:42 AM


All times are GMT -5. The time now is 09:08 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration