The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Can we send email with C program on Unix? whatisthis High Level Programming 3 07-07-2006 08:18 AM
help request for sending email from unix to internet sbabuts BSD 1 09-14-2005 01:48 PM
sending email from KSH unix script. rosh0623 Shell Programming and Scripting 3 07-26-2005 12:36 AM
sending email in unix. need help! tads98 Shell Programming and Scripting 2 05-16-2005 05:33 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 04-28-2005
Registered User
 

Join Date: Apr 2005
Posts: 1
unix - c program sending error from DB to email

hi,

i have a database table that automatically logs the errors in the database every 5 mins.

what i want to happen is to come up with a program using unix-c that gets all the information from the log table, i have a flag initially set to zero which means that the error is not yet sent, the flag will automatically be changed to 1 once the error is already sent.

i hope you can help me regarding this matter.
thank you so much!

you can also email me on this address:
Removed

Last edited by Perderabo; 04-28-2005 at 10:47 AM. Reason: Remove email address
Reply With Quote
Forum Sponsor
  #2  
Old 04-28-2005
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,667
Please read our rules and note:
(10) Don't post your email address and ask for an email reply. The forums are for the benefit of all, so all Q&A should take place in the forums.
Reply With Quote
  #3  
Old 04-28-2005
bhargav's Avatar
Registered User
 

Join Date: Sep 2004
Location: USA
Posts: 511
Here is some thing to start with ...
Loop this for every 5 minutes.

Or setup cron to run every 5 minutes ...



Code:
grep "error string"  logfile
if test $? -eq 0
then
    flag=1
fi
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 10:13 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0