Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Simple SMTP email within script...

by skx (Parson)
on Jun 08, 2008 at 10:41 UTC ( [id://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" some.email@example.com fi

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

Steve
--

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (4)
As of 2024-04-24 19:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found