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"

Submitter:  None
Submitted:  Wed 16 Nov 2005 06:10:14 PM UTC
   
 
Category:  None Severity:  2 - Minor
Priority:  5 - Normal Item Group:  None
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Closed

Discussion

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.g ... amp;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

 

Attached Files

This item currently has no attached files.

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

 

Votes

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.

 

History

Follow 2 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2005-11-16 charles_levert Severity3 - Normal 2 - Minor
    Open/ClosedOpen Closed

Back to the top

Powered by Savane 3.16.
Corresponding source code