[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: zgrep bug?



On Sun, Dec 28, 2003 at 02:45:31PM +0100, i.t wrote:
> Am Sonntag, 28. Dezember 2003 12:37 schrieb Otto Moerbeek:
> > > Am Sonntag, 28. Dezember 2003 11:25 schrieb Otto Moerbeek:
> > > > Works here ok. Maybe you have non-ascii chars in daemon.0.
> > >
> > > no - it's every gzipped file:
> >
> > At least you could try one of my suggestions to analyze this further. Just
> > giving this listing doesn't help at all
> 
> ok - in the no was included trying all your suggestions; there are no  
> non-ascii chars visible - also not in hexedit
> 
> # zgrep a daemon.0
> Binary file daemon.0 matches
> # tail -9 daemon.0
> Dec 28 09:49:39 it97 popa3d[17786]: Authentication passed for fulldis
                          ^                    ^      ^    
> Dec 28 09:49:39 it97 popa3d[17786]: 0 messages (0 bytes) loaded
                          ^                 ^                ^
> Dec 28 09:49:39 it97 popa3d[17786]: 0 (0) deleted, 0 (0) left
                          ^
> Dec 28 09:49:39 it97 popa3d[15252]: 5 messages (3926 bytes) loaded
                          ^                 ^                   ^
> Dec 28 09:49:40 it97 popa3d[15252]: 5 (3926) deleted, 0 (0) left
                          ^                       
> Dec 28 09:49:40 it97 popa3d[19319]: Authentication passed for obsd
                          ^                    ^      ^
> Dec 28 09:49:40 it97 popa3d[19319]: 0 messages (0 bytes) loaded
                          ^                 ^                ^
> Dec 28 09:49:40 it97 popa3d[19319]: 0 (0) deleted, 0 (0) left
                          ^                   
> Dec 28 10:00:01 it97 newsyslog[8030]: logfile turned over

You asked it to search for "a" in a file, uncompressing the file
if necessary. It looked in the file, saw it didn't need to gunzip,
dropped the results down to plain grep, and found a bunch of "a"
characters. What exactly are you claiming is a bug? That zgrep is saying
it found your needle in a binary haystack?

> # gzip -V
> $OpenBSD: main.c,v 1.47 2003/09/05 21:03:36 henning Exp $
> $OpenBSD: zopen.c,v 1.14 2003/08/03 01:26:46 deraadt Exp $
> $OpenBSD: gzopen.c,v 1.14 2003/07/17 20:17:02 mickey Exp $

-- 
"The last refuge of the insomniac is a sense of superiority to the
 sleeping world."
                --Leonard Cohen, The Favourite Game



Visit your host, monkey.org