bug-gnu-utils
[Top][All Lists]
Advanced

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

grep: obscure bug with fgrep -x and long lines


From: Steve Summit
Subject: grep: obscure bug with fgrep -x and long lines
Date: Mon, 10 Feb 2003 20:00:07 -0500

Attached is a tar+gzip archive containing three files:
pat, badfile, and goodfile.  It so happens that pat is
exactly line 2 of badfile, but the invocation

        fgrep -x "`cat pat`" badfile

prints nothing and exits with a status of 1.  Yet the same
pattern is also line 3 of goodfile, and for that file, it works
properly.

fgrep --version reports "fgrep (GNU grep) 2.4.2".

(After looking at the files, you may well wonder how I happened
to discover this preposterous example.  The answer is that I was
constructing the files at random, and using them as test cases in
a script I was running to test another vaguely greplike program
I'd written, where I was verifying the other program's output
using fgrep.)

Attachment: fgrepbug.tar.gz
Description: Binary data


reply via email to

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