On Sun, 2009-01-04 at 13:48 -0500, Victor Duchovni wrote:
> On Sun, Jan 04, 2009 at 08:33:12PM +0530, Ramprasad wrote:
> 
> > My logfiles are approx 1.5 GB each, if we rotate twice a day
> > grep sender.*recipient $logfile is really much much  faster than  grep
> > -i sender.*recipient $logfile
> > IMHO grep would  not count as lousy code ( on linux )
> 
> Use "egrep -i", and make sure you have "LANG=C" in the environment (or
> equivalent). Doing case-insensitive Unicode matches is likely much more
> painful than ASCII matches.
> 

Thanks that made *a lot* of difference
with "env LANG=C" grep -i works fine. 

Still I think a log in lowercase would be a nice feature to have. We
also put the entries into a DB and generate statistics. Every logparser
script has to take care to convert to lowercase. Even if performance is
not an issue, it would be a lot neater to log in lowercase






Reply via email to