Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re: Simple SMTP email within script...

by skx (Parson)
on Jun 08, 2008 at 10:41 UTC ( #690910=note: print w/ replies, xml ) Need Help??

in reply to Simple SMTP email within script...

If you only care about whether a given string exists in a logfile, and send a mail if so then you might find a shell script to be sufficient?

#!/bin/sh if ( grep "pattern" /var/log/log.file 2>/dev/null >/dev/null ); then hostname | mail -s "Backup failed" fi

Of course if you want to learn perl, or if your requirements change, then you could come back to it..


Comment on Re: Simple SMTP email within script...
Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://690910]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2015-11-29 22:06 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (753 votes), past polls