On 2007-09-30, Brian Fahrlander wrote:
> While we've got the attention of the most-able on this subject, I'd > like to reopen a discussion about a very similar tool: a 'grep' that > happens on tailing a file. There have been dozens of times that I'm > looking for a message number in /var/log/mail.log and would love to see > only the lines mentioning that message. > > A couple of years ago I asked and got a "maybe you could write > something", but I actually never could. It's not as easy as it looks. > > Any chance you guys have seen this done?
If you're interested in doing this within a script called by cron or
at, you might want to look at the logtail package (which is used by
logcheck).
Basically it stores (in a configurable file) the line number it last
read, and when called again gets the lines after that and updates the
marker.
--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at:
https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Received on Mon Oct 1 09:20:56 2007
This archive was generated by hypermail 2.1.8
: Sun Oct 21 2007 - 02:50:50 EDT
|