[Wolves] Help writing a script file

Wayne Morris wayne at machx.co.uk
Thu May 18 16:05:28 BST 2006


James Rogers wrote:

>Simon Morris wrote:
>  
>
>>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-----
>>    
>>
>
>#! /bin/bash
>echo "adminweb.log 'date'" > temp
>tail -n 10 /var/log/adminweb.log >> temp
>echo "web.log 'date'" >> temp
>tail -n 10 /var/log/web.log >> temp
>echo "Simias.log 'date'" >> temp
>tail -n 10 /var/log/Simias.log >> temp
>mail -s "Log files 'date'" email at address.com < temp
>
>ugly
>
>  
>
Does this email Pete every day to remind him he's ugly? ;-)







More information about the Wolves mailing list