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

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

grep bug ??


From: josX
Subject: grep bug ??
Date: Sun, 09 Mar 2003 11:49:07 +0100

 Hello,

 This might be false alarm, but i really don't get this or it is a bug:

 I try to match all occurences of "[^`]`[abcdefghijklmnopqrstuvwxyz#?QVP]"
 in a file, however, though most of such occurences are found, if the second
 character of the pattern falls in column one of a line, the pattern is NOT
 matched.

-FILE-
`a
``a
 `a
 ``a
-ENDFILE-
% egrep '[^`]`a' FILE
 `a
% egrep --version
egrep (GNU grep) 2.4.2

Copyright 1988, 1992-1999, 2000 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
% uname -a
Linux mraha 2.2.17 #1 Mon Nov 12 17:46:22 CET 2001 i686 unknown

I've worked around this by doing:
% egrep '[^`]`a|^`a' FILE
`a
 `a

(I haven't checked new versions of grep.)

Good luck and all the best,
Using your software with much pleasure, thank you very much.
jos




reply via email to

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