- Grep out the juicy parts:
grep hotmail.msn.com <my_log_file> > ./hotmail_hits
- Save the following as a perl script, say in hotmail.pl (right, I'm no hardcore perl junkie :-)). btw, don't forget to chmod u+x:
#!/usr/bin/perl
while (<>) {
for $fld (split("\&")) {
@log = split("=", $fld);
if ( @log[0] =~ /login/ ) {
print @log[1], "\@hotmail.com\n";
}
}
}
- Feed your hotmail_hits file to hotmail.pl:
./hotmail.pl < ./hotmail_hits
- For the final twist, sort out the dupes:
./hotmail.pl < ./hotmail_hits | sort | uniq