[Top][All Lists]

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

Odd grep bug

From: Carlson, Benjamin P CW2 NG NG NGB
Subject: Odd grep bug
Date: Tue, 02 Aug 2011 16:40:40 -0500

  I have found an odd bug that only occurs in a very specific situation 
(unfortunately it is a situation I run into a lot): Using
Red Hat REL with kernel:  2.6.18-92.1.6.el5 #1 SMP and grep (GNU grep) 2.5.1
grep fails a search when the following 4 situations occur simultaneously:
1) using –r option
2) using –a2 (or any other number)
3) piping to another grep with –v to remove unwanted lines
4) looking for a string with an “X” in it
grep –ra2 TRDXST *|grep –v svn 
This line should, in my code base, return about a dozen finds, and it does if I 
move into the directory with the files in it so that I don’t need the –r 
option, or if I get rid of the second grep, or if I get rid of the –a2 option. 
This problem is very reproducible and happens with any string containing a 
capitol x that I have tried so far and does not occur with ALL other strings 
(at least not yet)!

Benjamin P Carlson, CISSP
home 580-353-1582
FireFinder Software Engineer
CGI Federal Systems

reply via email to

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