Date: Fri, 22 Aug 2008 17:39:19 +0200 (CEST) From: Oliver Fromme <olli@lurza.secnetix.de> To: freebsd-questions@FreeBSD.ORG, dave.list@pixelhammer.com Subject: Re: Tailing logs Message-ID: <200808221539.m7MFdJLB067083@lurza.secnetix.de> In-Reply-To: <48AECD11.1000705@pixelhammer.com>
next in thread | previous in thread | raw e-mail | index | archive | help
DAve <> wrote: > I would love to have a way to tail a log, like piping to grep, except I > see every line and the lines I would normally grep for are highlighted. > That would be cool. Anyone know of a bash command or tool that will do this? > > Side note, I am tailing sendmail after changes to my outbound queue > runners. I want to highlight my sm-mta-out lines but still see all lines. You could use this script: http://www.secnetix.de/olli/scripts/bold It's a filter that works like similar to grep, but it highlights the parts that match your regular expression. The script contains usage information. So you can do things like this: $ tail -f /var/log/maillog | bold -l myhost.mydomain (The -l option specifies to highlight the whole line, not just the part that matches.) Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd "C++ is over-complicated nonsense. And Bjorn Shoestrap's book a danger to public health. I tried reading it once, I was in recovery for months." -- Cliff Sarginson
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200808221539.m7MFdJLB067083>