![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Federated Event Systems: The Event Web | iBot | Complex Event Processing RSS News | 0 | 05-16-2008 03:50 AM |
| Simple Event Processing != Complex Event Processing | iBot | Complex Event Processing RSS News | 0 | 12-16-2007 12:10 PM |
| Event Streams and Event Clouds Revisited | iBot | Complex Event Processing RSS News | 0 | 08-09-2007 11:50 PM |
| automated ftp. | sangfroid | Shell Programming and Scripting | 10 | 05-07-2007 11:52 AM |
| Unable to send eMail from a UNIX-Host ( using mailx ) to a Outlook-email-addres(Win) | Vetrivela | UNIX for Advanced & Expert Users | 2 | 02-15-2005 10:43 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
automated email on a log event
I am monitoring a logfile using tail -f file.log|"ERROR"
I would like to write a korn script that monitors this for me and emails me if the event happens. It would be great if it attached the file to the email as well. Any Ideas? |
|
||||
|
Code:
while true
do
tail -f file.log | grep -q 'ERROR'
if [ $? -eq 0 ] ; then
cat file.log | /usr/bin/mailx -s 'logfile error' me@whereIam.com
break
fi
done
when to exit the loop. |
|
|||||
|
What about this: http://www.unix.com/showthread.php?p...#post302073804
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|