[Gllug] Simple Bash Script
Bruce Richardson
itsbruce at workshy.org
Tue Jun 3 08:57:19 UTC 2008
On Tue, Jun 03, 2008 at 08:49:45AM +0100, John wrote:
> You should be able to send an email by echo'ing the contents to
> mail (or mutt), eg something like:
>
> echo "Load average to high removed from cluster
> Load currently at $LOAD
> allowed limit $NOTIFY" | mail -s "$HOST has been removed from the cluster" "$EMAIL"
If it's running from cron then it really only needs to echo the text to
stdout. Cron will mail the output if it (and the mail system) are
properly configured.
--
Bruce
I object to intellect without discipline. I object to power without
constructive purpose. -- Spock
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: Digital signature
URL: <http://mailman.lug.org.uk/pipermail/gllug/attachments/20080603/a48eddd9/attachment.pgp>
-------------- next part --------------
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list