Gentoo Archives: gentoo-user

From: Willie Wong <wwong@×××××××××.edu>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] OT - Extracting IP addresses with grep
Date: Thu, 12 Oct 2006 19:55:04
Message-Id: 20061012195019.GA14572@math.princeton.edu
In Reply to: [gentoo-user] OT - Extracting IP addresses with grep by Michael Sullivan
1 On Thu, Oct 12, 2006 at 01:51:05PM -0500, Michael Sullivan wrote:
2 > michael@bullet ~/.maildir/.SPAM/cur $ cat * | grep -P m/\d+\.\d+\.\d
3 > +\.\d+/
4
5 You might want the expression in quotes to prevent bash from intercepting
6 those backslashes.
7
8 grep -P '\d+\.\d+\.\d+\.\d+'
9
10 HTH,
11
12 W
13 --
14 Willie W. Wong wwong@××××××××××××××.edu
15 408 Fine Hall, Department of Mathematics, Princeton University, Princeton
16 A mathematician's reputation rests on the number of bad proofs he has given.
17 --
18 gentoo-user@g.o mailing list