buggrep - Bugs: bug #16225, grep -wF bug with multiple patterns

 
 

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

bug #16225: grep -wF bug with multiple patterns

Submitter:  None
Submitted:  Thu 30 Mar 2006 07:42:40 AM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Duplicate
Privacy:  Public Assigned to:  None
Open/Closed:  Closed

Wed 17 May 2006 08:47:11 PM UTC, comment #2: 

Thanks for the report, Markus.  Indeed it has already been fixed.  Probably a duplicate of bug #13920.  Closing.

Julian Foad <julianfoad>
Mon 15 May 2006 09:12:24 PM UTC, comment #1: 

This has apparently been fixed in CVS:

$ src/grep -wF '12
45' in.txt
12
45
12
45
$ src/grep -wFf patterns.txt in.txt
12
45
12
45

Benno Schulenberg <bens>
Thu 30 Mar 2006 07:42:40 AM UTC, original submission:  

Hi,

checkout the commands below, containing 5 calls into grep. In my environment ("grep (GNU grep) 2.5.1") the two calls have wrong results:

# Begin of shell commands
echo '12
45
456 no word match for 45
12
45' > in.txt
echo '12
45' > patterns.txt
# 1) Works, emitting 12 45 12 45:
grep -wE '(12)|(45)' in.txt
# 2) Works, emitting 12 45 12 45:
grep -w '12
45' in.txt
# 3) Fails, emitting only 12 45:
grep -wF '12
45' in.txt
# 4) Works, emitting 12 45 12 45:
grep -wf patterns.txt in.txt
# 5) Fails, emitting only 12 45:
grep -wFf patterns.txt in.txt
# End of shell commands

AFICS, the symptom is that after the 1st non-word-match ("456") it stops matching other correct word-matches.


Regards,
Markus Mauhart.

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-05-17 julianfoad StatusNone Duplicate
    Open/ClosedOpen Closed

Back to the top

Powered by Savane 3.13-f8d8.
Corresponding source code