Re: [gentoo-user] OT - grep: The -P option is not supported

2006-10-25 Thread kashani

Michael Sullivan wrote:

I have a script I wrote a couple of weeks ago.  Part of the script scans
email files and returns IP addresses found in them.  I did this with
this command:

cat * |  grep -Po \[\d+\.\d+\.\d+\.\d+\]

It worked fine right up until this afternoon.  Now I get this:

[EMAIL PROTECTED] ~/spam $ cat * | grep -Po \[\d+\.\d+\.\d+\.\d+\]
grep: The -P option is not supported
[EMAIL PROTECTED] ~/spam $


more /usr/portage/sys-apps/grep/ChangeLog

*grep-2.5.1a-r1 (01 Aug 2006)

  01 Aug 2006; Mike Frysinger [EMAIL PROTECTED] +grep-2.5.1a-r1.ebuild:
  Add back in pcre #141609.

I suspect that's the issue, that your new grep is missing pcre, though 
it's hard to tell since you didn't mention which version of grep you 
have installed. Additionally pcre became a use flag in 2.5.1a-r1


kashani
--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] OT - grep: The -P option is not supported

2006-10-25 Thread Bo Ørsted Andresen
On Wednesday 25 October 2006 20:51, Michael Sullivan wrote:
[SNIP]
 cat * |  grep -Po \[\d+\.\d+\.\d+\.\d+\]

;)

http://www.ruhr.de/home/smallo/award.html

 It worked fine right up until this afternoon.  Now I get this:

 [EMAIL PROTECTED] ~/spam $ cat * | grep -Po \[\d+\.\d+\.\d+\.\d+\]
 grep: The -P option is not supported
 [EMAIL PROTECTED] ~/spam $
[SNIP]

My guess would be that you need to enable a pcre use flag for sys-apps/grep.

-- 
Bo Andresen


pgpcgrLxQVMMC.pgp
Description: PGP signature