[Wolves] Help writing a script file
Simon Morris
simon.morris at cmtww.com
Thu May 18 15:47:20 BST 2006
On Thu, 2006-05-18 at 15:37 +0100, Peter Cannon wrote:
>
> Um, sorry to be Mr Picky
> Adminweb is the Log Title
> 18.5.2006 is "Today's Date"
> 14:52 is "Today's Time"
Ahh, sorry. I didn't pick up on that.
>
> Do I include the ~sm ? or is that your sig? if so that's OK.
The SM is my sig - the script is just the text between the ----START...
and ----END.... lines
-----START SCRIPT-----
#!/bin/bash
EMAILTO=simon.morris at cmtww.com
EMAILTO2=pete at somedomain.com
mail -s "This is the subject line" "${EMAILTO}" -c "${EMAILTO2}" << EOF
adminweb `date +%e.%m.%Y` `date +%H:%M`
=====================================
`tail -n 10 /var/lib/simias/log/adminweb.log`
web `date +%e.%m.%Y` `date +%H:%M`
=====================================
`tail -n 10 /var/lib/simias/log/web.log`
EOF
-----END SCRIPT-----
Repeat wash and rinse for any other log files you want..
Thanks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://mailman.lug.org.uk/pipermail/wolves/attachments/20060518/477b7895/attachment-0001.bin
More information about the Wolves
mailing list