buggrep - Bugs: bug #14946, "grep -P" doesn't...

 
 

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

bug #14946: "grep -P" doesn't support pattern lists

Submitted by:  Charles Levert <charles_levert>
Submitted on:  Thu 10 Nov 2005 04:08:59 AM UTC  
 
Category: NoneSeverity: 2 - Minor
Item Group: NoneStatus: Postponed
Privacy: PublicAssigned to: None
Open/Closed: Open

Fri 11 Nov 2005 10:40:46 AM UTC, comment #1:

Upon reflection, my proposed solution would not work, so I at least added an error and a message for this situation. This is trivial and will do for now. Details in the ChangeLog.

CVS commit:
ChangeLog 1.282
src/search.c 1.39

Charles Levert <charles_levert>
Thu 10 Nov 2005 04:08:59 AM UTC, original submission:

Traditional fgrep and POSIX grep have support for a pattern list, instead of a single pattern. GNU grep inherited this, and it can be specified with multiple -e arguments, a -f file, or just by embedding newlines in a pattern argument.

"grep -P" currently does not do anything to recognize a pattern list from a single pattern. Therefore, it doesn't work, but there is also no run-time warning about it being unsupported.

Since "grep -P" is low priority, I only give this a severity of 'minor'.

Would replacing each newline character in the aggregated pattern by a vertical line character do the trick? Just as the tricks that are used to support -w and -x, this can be abused by a user who intentionally feeds in an invalid pattern or pattern list (e.g., "echo 'x y z' | grep -P -w --color 'x) y (z'").

Charles Levert <charles_levert>

 

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):

 

 

Follows 1 latest change.

Date Changed By Updated Field Previous Value => Replaced By
Fri 11 Nov 2005 10:40:46 AM UTCcharles_levertStatusNone=>Postponed

Back to the top


Powered by Savane 3.1-cleanup