buggrep - Bugs: bug #15479, -w option does not work properly...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #15479: -w option does not work properly in grep -F (or fgrep)

Submitter:  None
Submitted:  Thu 19 Jan 2006 04:19:02 AM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Duplicate
Privacy:  Public Assigned to:  None
Open/Closed:  Closed

Thu 19 Jan 2006 01:22:02 PM UTC, comment #1: 

Thank you for the report.  I can confirm that this is a bug in grep v2.5.1.  It has already been fixed in the CVS source repository but (sadly) no newer version has yet been released.

This bug report is a duplicate of bug #13920 (although that did not mention "-F" or "fgrep" in its summary until I modified it just now).

Note that the packagers of software for some operating systems build grep with patches applied, so, for example, the grep v2.5.1 supplied in SuSE Linux 10.0 doesn't have this bug.  When you report another bug, please remember to say which version of grep you are using and on which operating system.

Julian Foad <julianfoad>
Thu 19 Jan 2006 04:19:02 AM UTC, original submission:  

Below are two 'grep -F' executions, one with -w, one without it.

elaine41:~/wylsrc> grep -F -w XGET *.c
comm.c:extern void XGET ();
exec.c:extern void XGET ();
exec.c:           XGET ();
exec.c:           XGET ();
func.c:extern void XGET ();
func.c:           XGET ();
func.c:           XGET ();
view.c:extern void XGET ();
view.c:           XGET ();
xcall.c:           XGET ();
xcall.c:           XGET ();
xcall.c:           XGET ();
xcall.c:           XGET ();
elaine41:~/wylsrc> grep -F XGET *.c
comm.c:extern void XGET ();
comm.c:extern void XGETFRST ();
comm.c:extern void XGETNEXT ();
comm.c:           XGETFRST ();
comm.c:           XGETNEXT ();
comm.c:           XGET ();
comm.c:           XGET ();
comm.c:           XGET ();
comm.c:           XGET ();
exec.c:extern void XGET ();
exec.c:extern void XGETFRST ();
exec.c:extern void XGETLAST ();
exec.c:extern void XGETNEXT ();
exec.c:extern void XGETPREV ();
exec.c:void EXGET ();
exec.c:           EXGET ();
exec.c:           void EXGET () {
exec.c:           XGET ();
exec.c:           XGET ();
exec.c:           XGETFRST ();
exec.c:           XGETLAST ();
exec.c:           XGETNEXT ();
exec.c:           XGETPREV ();
func.c:extern void XGET ();
func.c:           XGET ();
func.c:           XGET ();
proc.c:extern void XGETFRST ();
proc.c:extern void XGETNEXT ();
proc.c:extern void XGETLAST ();
proc.c:           XGETFRST ();
proc.c:           XGETNEXT ();
proc.c:           XGETLAST ();
recs.c: /*            XGETINFO - GET RECORD GROUP INFORMATION
recs.c: /*             XGET   - GET A RECORD
recs.c:void XGET()
recs.c: /*             XGETNEXT - GET NEXT RECORD
recs.c:void XGETNEXT()
recs.c: /*             XGETPREV - GET PREVIOUS RECORD
recs.c:void XGETPREV()
recs.c: /*             XGETFRST - GET FIRST RECORD IN RANGE
recs.c:void XGETFRST()
recs.c: /*             XGETLAST - GET LAST RECORD IN RANGE
recs.c:void XGETLAST()
view.c:extern void XGET ();
view.c:           XGET ();
xcall.c:extern void XGETFRST ();
xcall.c:extern void XGETNEXT ();
xcall.c:extern void XGET ();
xcall.c:           XGET ();
xcall.c:           XGET ();
xcall.c:           XGET ();
xcall.c:           XGET ();
xcall.c:           XGETFRST ();
xcall.c:           XGETNEXT ();
xcall.c:           XGETFRST ();
xcall.c:           XGETNEXT ();
elaine41:~/wylsrc>

The occurrences of XGET in recs.c do NOT appear at all in the -w execution.
And there are five instances of the word XGET in xcall.c, but the -w execution
only reported four of them.  The failure to pick up recs.c is my main concern
since I was looking for all modules that used the XGET function, and didn't get
recs.c using -w.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

 

Follow 2 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2006-01-19 julianfoad StatusNone Duplicate
    Open/ClosedOpen Closed

Back to the top

Powered by Savane 3.13-d3ae.
Corresponding source code