1 |
I have a mail directory with several hundred spammish emails that have |
2 |
been collecting over the past month. I haven't gotten around to |
3 |
processing them yet (abuse@×××.net if available, blocked if not) I |
4 |
would like to write a script that would extract the IP addresses from |
5 |
all these emails, but I can't figure out how to get grep to cooperate. |
6 |
I created a perl regular expression for matching against IP addresses |
7 |
and tried to pass it to grep, but it wouldn't return anything. I don't |
8 |
know what I'm doing wrong. Here's my command: |
9 |
|
10 |
michael@bullet ~/.maildir/.SPAM/cur $ cat * | grep -P m/\d+\.\d+\.\d |
11 |
+\.\d+/ |
12 |
|
13 |
-- |
14 |
gentoo-user@g.o mailing list |