From owner-freebsd-questions Sat Oct 27 17:21:38 2001 Delivered-To: freebsd-questions@freebsd.org Received: from ns1.avatar.com (ns1.avatar.com [199.33.206.1]) by hub.freebsd.org (Postfix) with ESMTP id 52BEB37B401 for ; Sat, 27 Oct 2001 17:21:34 -0700 (PDT) Received: from tomcat (tomcat.avatar.com [199.33.206.20]) by ns1.avatar.com (Postfix) with SMTP id 1838FA4B07 for ; Sat, 27 Oct 2001 17:21:34 -0700 (PDT) From: "Kory Hamzeh" To: Subject: How would you do this? Date: Sat, 27 Oct 2001 17:21:35 -0700 Message-ID: <001a01c15f46$809ce580$14ce21c7@avatar.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Importance: Normal 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 need to write a script (preferably bourne shell) to send an mail every time a certain message gets sysloged, but not to send e-mail more than once an hour. I can grep /var/log/messages for the message, but I could not come up with a simple, clever way of making sure I don't send the e-mail out more than once an hour and the next time I grep, that I check for only new items logged since the last check. Any pointers would be great! -- Kory Hamzeh ICQ # 133630494 http://www.avatar.com/ http://www.metaphysical-store.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message