[Top][All Lists]

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

Re: grep -i bug

From: Chris F.A. Johnson
Subject: Re: grep -i bug
Date: Wed, 16 Feb 2005 00:46:50 -0500 (EST)

On Tue, 15 Feb 2005, Karsten Johansson wrote:


I have found what looks like a bug in grep. I have not been able to test it on
other systems, but for the record, I am using SuSE's Novell Linux. I haven't
noticed this bug before, but then again, I hadn't tried to grep through a 40
Gigabyte file before.

Steps to see the bug:

    grep -i someword some40Gigabitefile.txt > results.txt

looking at results, we could for example see:

    40047878321- someword

Now do this:
    xxd -s 40047878321 | less

This /should/ take us right to the offset where the word appears. For the most
part it does. But once the word is found really deep into the file - ie: the
byte offset gets huge - those offsets have nothing to do with reality.

Let me know if you have already discovered this, if it is fixed, or what I'm
doing wrong to make this happen.

    What size integer does xxd use? Could it be an overflow error in

    Have you tried that byte offset with other utilities?

        Chris F.A. Johnson                      http://cfaj.freeshell.org
                Everything in moderation -- including moderation

reply via email to

[Prev in Thread] Current Thread [Next in Thread]