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)

Submitted by:  None
Submitted on:  Thu 19 Jan 2006 04:19:02 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Duplicate
Privacy: PublicAssigned 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

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 2 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Thu 19 Jan 2006 01:22:02 PM UTCjulianfoadStatusNone=>Duplicate
  Open/ClosedOpen=>Closed

Back to the top


Powered by Savane 3.1-cleanup1