Output from tail to a user

Hi all

I've read through a few of these lists but can't find a right combination of answers (I can create VPN's but can't send an email!)

Ok - I'm using taper as backup software which generates a log file called taper_log I want the last eight lines of this log file to be sent to a specified user. The system is using postfix and fetchmail.

The backup job is run as a cron job so I'd want to send the mail from a cron job so I can set the time after the job has finished.

I can get the required lines with tail and...
#tail -8 taper_log >> results.log

to create a file called results.log

How can I sned that file to one of the users? Or can I redirect output directly from tail to an email?

Regards

Ifan

You can try the following in the cron job (as long as the cron job isn't sending it's output to taper.log):

mailx -s"taper log" youruser@yourcompany < `tail -8 /yourdir/taper.log`

Edited: Perderabo is correct - I don't know what I was thinking!

I'm sure RTM means:

tail -8 /yourdir/taper.log | mailx -s"taper log" youruser@yourcompany

Thanks chaps - that cured it - I was getting my >> and << all messed up.