[TriLUG] send an email within a script

Dean Price dprice153 at charter.net
Fri Mar 5 09:20:19 EST 2004


Not sure if this will help. I use this simple script that runs as a cron
job to check if anyone has tried to visit a website that was banned and
send the results to me.

#!/bin/bash
cat /var/log/dansguardian/access.log | grep DENIED | mail -s "Web DENIED
Log" deano at price4.org


It is just one line

Hope it helps

Dean Price
deano at price4.org
dprice153 at charter.net
dean.price at ctg.com


Douglas Kojetin said:
> I run some computational jobs that take (sometimes) a long time -- they
> basically consist of a bunch of piped lines into various programs
> within a C-shell script.  Anywho, the programs I use have the option of
> displaying progress (verbose) or not.  I'd like to turn off the
> verboseness ... but would like to have some sort of notification that
> the job has finished (other than using 'top' to check and see if the
> processes are still running).
>
> Is there a way, within a C-shell script, to send a quick mail to a
> specified remote address with a subject (and body, if not difficult) to
> alert me that the job is finished?  What program(s) could I use and how
> might I go about doing it?
>
> Thanks!
> Doug
>
> --
> TriLUG mailing list        : http://www.trilug.org/mailman/listinfo/trilug
> TriLUG Organizational FAQ  : http://trilug.org/faq/
> TriLUG Member Services FAQ : http://members.trilug.org/services_faq/
> TriLUG PGP Keyring         : http://trilug.org/~chrish/trilug.asc
>




More information about the TriLUG mailing list