extract a list of mailadresses from maillog

zcat /var/log/mail/old/info* | egrep -i "to=<\w+@goldfisch.at"  | 
perl -e 'while (<STDIN>) { $x->{$1}++ if /to\=\<(.*?)\@goldfisch.at>/}; 
foreach (sort keys %$x) { print $_,"\t",$x->{$_},"\n"}' >/opt/x
 
knowwiki/shorties/get_mail_names.txt · Last modified: 2006/03/26 19:56