From owner-freebsd-questions Sat Oct 6 8:12:29 2001 Delivered-To: freebsd-questions@freebsd.org Received: from femail2.sdc1.sfba.home.com (femail2.sdc1.sfba.home.com [24.0.95.82]) by hub.freebsd.org (Postfix) with ESMTP id 8DFBD37B409 for ; Sat, 6 Oct 2001 08:12:26 -0700 (PDT) Received: from home.com ([24.101.171.238]) by femail2.sdc1.sfba.home.com (InterMail vM.4.01.03.20 201-229-121-120-20010223) with ESMTP id <20011006151226.ETJT4293.femail2.sdc1.sfba.home.com@home.com> for ; Sat, 6 Oct 2001 08:12:26 -0700 Message-ID: <3BBF1F7D.3218276B@home.com> Date: Sat, 06 Oct 2001 11:13:02 -0400 From: cyu0635@home.com X-Mailer: Mozilla 4.74 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: "freebsd-questions@FreeBSD.ORG" Subject: script question Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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