buggrep - Bugs: bug #14990, "The -P option is not...

 
 

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

bug #14990: "The -P option is not supported"

Submitted by:  None
Submitted on:  Wed 16 Nov 2005 06:10:14 PM UTC  
 
Category: NoneSeverity: 2 - Minor
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Closed

Wed 16 Nov 2005 09:05:58 PM UTC, comment #3:

> "Support for the -P option has not been compiled into this binary"


Good idea. I'll see if I can't do that right away, since it's a simple change.

Charles Levert <charles_levert>
Wed 16 Nov 2005 09:01:56 PM UTC, comment #2:

This specific message is the result of your grep having been built with "configure --disable-perl-regexp". Did you have libpcre installed on your Gentoo system when you build grep? There is a "pcre? ( dev-libs/libpcre )" and a "$(use_enable pcre perl-regexp)" in Gentoo's grep-2.5.1-r8.ebuild.

Support for "grep -P" is experimental and partial. As part of a proposed rework I am currently doing on the documentation, I have added a few days ago: "Interpret the pattern as a Perl regular expression. This is highly experimental and @samp{grep@ -P} may warn of unimplemented features."

"grep -P" is not broken, it's a work in progress. Since there are more fundamental bugs in grep that need to be addressed, it's also not the highest priority.

Charles Levert <charles_levert>
Wed 16 Nov 2005 08:59:51 PM UTC, comment #1:

> I'm using grep 2.5.1-r8 on Gentoo and have perl 5.8.6 for i686
> linux installed.


Add "pcre" to your USE flags in /etc/make.conf.

But indeed the error message could be made a bit clearer, for example: "Support for the -P option has not been compiled into this binary".

Benno Schulenberg <bens>
Wed 16 Nov 2005 06:10:14 PM UTC, original submission:

grep 2.5.1 seems to not support the -P or --perl-regexp option, despite the fact that these options are documented in the man page.

After reading another bug, "grep -P" doesn't support pattern lists" (http://savannah.gnu.org/bugs/?func=detailitem&item_id=14946), I guess it is the case that -P is broken. Ideally, -P should be fixed! If it can't be fixed, there should be a mention of this in the man page.

I'm using grep 2.5.1-r8 on Gentoo and have perl 5.8.6 for i686 linux installed.

DEMONSTRATION:
me@linux ~ $ grep -V
grep (GNU grep) 2.5.1

Copyright 1988, 1992-1999, 2000, 2001 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

me@linux ~ $ grep -P "\d" /etc/services
grep: The -P option is not supported

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
Wed 16 Nov 2005 09:01:56 PM UTCcharles_levertSeverity3 - Normal=>2 - Minor
  Open/ClosedOpen=>Closed

Back to the top


Powered by Savane 3.1-cleanup1