Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 06 Oct 2001 10:43:09 -0500
From:      jacks@sage-american.com
To:        cyu0635@home.com, "freebsd-questions@FreeBSD.ORG" <freebsd-questions@FreeBSD.ORG>
Subject:   Re: script question
Message-ID:  <3.0.5.32.20011006104309.031a30f0@mail.sage-american.com>
In-Reply-To: <3BBF1F7D.3218276B@home.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3.0.5.32.20011006104309.031a30f0>