# Now step through the mail store one file (message) at a time
for MSG in `find $MAILROOT -print -type f`
do
# Each message we find - rip out the e-mail address
# The sed command isn't mine - I got it from here:
# http://sed.sourceforge.net/grabbag/tutorials/sed1line.txt
egrep '^From:' $MSG | sed 's/ *(.*)//; s/>.*//; s/.*[:<] *//' >>
$TMP
done
You can replace this entire "for" loop by a single recursive egrep:
egrep -r '^From: ' $MAILROOT |....
--P
-- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
