Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

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" 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
--


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

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (8)
As of 2014-12-28 09:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (179 votes), past polls