[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #14946] "grep -P" doesn't support pattern lists
From: |
Charles Levert |
Subject: |
[bug #14946] "grep -P" doesn't support pattern lists |
Date: |
Thu, 10 Nov 2005 04:09:00 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050920 Firefox/1.0.7 |
URL:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=14946>
Summary: "grep -P" doesn't support pattern lists
Project: grep
Submitted by: charles_levert
Submitted on: Thu 11/10/05 at 04:08
Category: None
Severity: 2 - Minor
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
_______________________________________________________
Details:
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'").
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=14946>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [bug #14946] "grep -P" doesn't support pattern lists,
Charles Levert <=