Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

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 having an uproarious good time at the Monastery: (12)
As of 2015-07-28 18:11 GMT
Find Nodes?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...

    Results (258 votes), past polls