Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 06 Oct 2001 11:13:02 -0400
From:      cyu0635@home.com
To:        "freebsd-questions@FreeBSD.ORG" <freebsd-questions@FreeBSD.ORG>
Subject:   script question
Message-ID:  <3BBF1F7D.3218276B@home.com>

next in thread | raw e-mail | index | archive | help
Hi all

I use the following script to mail to log file
but sometimes I got the workings 'Null message, hope that ok' after
running the script

Why?
and what is wrong?

TIA

#! /bin/bash
/bin/cat /var/log/messages    > /tmp/tmp_logs
/bin/cat /var/log/secure    >>  /tmp/tmp_logs
/bin/cat /tmp/tmp_logs | grep "$(date +"%b %d" | sed 's/ 0/ /g')" | sort
-o /tmp
/yesterday_log +2
/bin/cat /tmp/yesterday_log | mail -s "Yesterday's Logged Events"
peter@localhos
t


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3BBF1F7D.3218276B>