From owner-freebsd-questions Sun Oct 28 5:21: 5 2001 Delivered-To: freebsd-questions@freebsd.org Received: from kabel203069.kabel.utwente.nl (kabel203069.kabel.utwente.nl [130.89.203.69]) by hub.freebsd.org (Postfix) with ESMTP id 1A56E37B406 for ; Sun, 28 Oct 2001 05:20:58 -0800 (PST) Received: by kabel203069.kabel.utwente.nl (Postfix, from userid 1000) id C91401F30; Sun, 28 Oct 2001 14:20:56 +0100 (CET) Date: Sun, 28 Oct 2001 14:20:56 +0100 From: Rogier Steehouder To: Kory Hamzeh Cc: Shashi Dookhee , freebsd-questions@freebsd.org Subject: Re: How would you do this? Message-ID: <20011028142056.B622@localhost> Mail-Followup-To: Rogier Steehouder , Kory Hamzeh , Shashi Dookhee , freebsd-questions@freebsd.org References: <001d01c15f4a$3397f5a0$14ce21c7@avatar.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <001d01c15f4a$3397f5a0$14ce21c7@avatar.com>; from kory@avatar.com on Sat, Oct 27, 2001 at 05:48:04PM -0700 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 On 27-10-2001 17:48 (-0700), Kory Hamzeh wrote: > Hi Shashi, > > My concern is the second time it is run, I need to make sure that I > don't send another e-mail because of OLD messages (which I already > sent an e-mail for an hour ago). I looks like I need to parse the file > and keep the timestamp of the newest log message that triggered the > e-mail, and then only check for new messages with newer timestamps. > That is something that I don't feel competent enough to do with a > scripting language (i.e. convert a syslog time to a absolute number). > > Kory If you run the script hourly from cron, you only need to check items from the last hour: no need to save the time. As to your competence in scripting languages, well... With kind regards, Rogier Steehouder P.S. If you can tell me/us exactly what message you're looking for, I/we could give you a ready-to-use example. It would be better for you to learn perl if you might want more of this stuff in the future. -- ___ _ -O_\ // | / Rogier Steehouder //\ / \ r.j.s@gmx.net // \ <---------------------- 25m ----------------------> To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message