[wellylug] Getting Email addresses from a file with grep etc

Joseph Booth joseph at paradise.net.nz
Fri Jun 4 16:26:42 NZST 2004


Hi all.

Trying to add about four thousand (valid) email addresses to a list 
from my mail archives. The mail is in a text file, and i'm trying to 
grep out clean addresses for adding to a mail list
I know it sounds highly spamish, but I assure you each of these email 
address is from personal correspondence over the last year...  I would 
download a email harvesting engine, but that seems wrong ;)

I've tried:

grep -ane @  ~/Desktop/mfest.txt

Which gives me each line with a @ in it.. and the rest of the crud..
....
4100: From: XXX <xxxxxx at xxxxxxx.xxx.xx>
4107:To: "List Owner for: xxxxx" <xxxxxx at xxxxxxx.xxx.xx>
4108:Subject: subscribed xxxxxx at xxxxxxx.xxx.xx
4109:Reply-To: xxxxxx at xxxxxxx.xxx.xx
4115:xxxxxx at xxxxxxx.xxx.xx has subscribed on list: MovieFest
4127:<xxxxxx at xxxxxxx.xxx.xx>
4129:To: "xxxxxx at xxxxxxx.xxx.xx" <xxxxxx at xxxxxxx.xxx.xx>
4130:Cc: xxxxxx at xxxxxxx.xxx.xx
4132:Reply-To: xxxxxx at xxxxxxx.xxx.xx
4137:From: "xxxxxx at xxxxxxx.xxx.xx" <xxxxxx at xxxxxxx.xxx.xx>
4138:To: xxxxxx at xxxxxxx.xxx.xx
4161:[mailto:xxxxxx at xxxxxxx.xxx.xx]
4164:Cc: xxxxxx at xxxxxxx.xxx.xx
4208:xxxxxx at xxxxxxx.xxx.xx
4210:<xxxxxx at xxxxxxx.xxx.xx>
4212:To: "xxxxxx xxxxxxx" <xxxxxx at xxxxxxx.xxx.xx>
4213:Cc: xxxxxx at xxxxxxx.xxx.xx
4215:Reply-To: xxxxxx at xxxxxxx.xxx.xx
4220:From: "xxx xxxx" <xxxxxx at xxxxxxx.xxx.xx>
4221:To: xxxxxx at xxxxxxx.xxx.xx
4244:[mailto:xxxxxx at xxxxxxx.xxx.xx]
.....

I've been playing with variations on...
$ grep -an '[a-z0-9._]+@[a-z.]+' ~/Desktop/mfest.txt
But can't get anything to output...

Any better ideas?

--
Jo 'Mangee' Booth
021 JBOOTH
Did you miss it? See the playback!
http://webcam.mangee.net.nz/overview.html?p=100

MovieFest is back!: Make a movie, Watch and Vote to win prizes!!
http://moviefest.org.nz/register
Sponsored by Canon: advanced simplicity

WelMac NMG: Geek hangout - Second tuesday each month!
http://nmug.welmac.org.nz




More information about the wellylug mailing list