From owner-freebsd-questions Sat Oct 6 8:42:49 2001 Delivered-To: freebsd-questions@freebsd.org Received: from sage-american.com (sage-american.com [216.122.141.44]) by hub.freebsd.org (Postfix) with ESMTP id EEEAC37B407 for ; Sat, 6 Oct 2001 08:42:38 -0700 (PDT) Received: from sageone (ppp-208-191-234-133.dialup.crchtx.swbell.net [208.191.234.133]) by sage-american.com (8.9.3/8.9.3) with SMTP id KAA05522; Sat, 6 Oct 2001 10:42:34 -0500 (CDT) Message-Id: <3.0.5.32.20011006104309.031a30f0@mail.sage-american.com> X-Sender: jacks@mail.sage-american.com X-Mailer: QUALCOMM Windows Eudora Pro Version 3.0.5 (32) Date: Sat, 06 Oct 2001 10:43:09 -0500 To: cyu0635@home.com, "freebsd-questions@FreeBSD.ORG" From: jacks@sage-american.com Subject: Re: script question In-Reply-To: <3BBF1F7D.3218276B@home.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" 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 I've received that message when the file being "catted" is empty.... At 11:13 AM 10.6.2001 -0400, cyu0635@home.com wrote: >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 > > Best regards, Jack L. Stone, Server Admin Sage-American http://www.sage-american.com jacks@sage-american.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message