On 20 Jul 2006, at 15:54 , Michael Heth wrote:
is there a script out there that would let me select all the messages in a particular inbox, make a list of who I received the mesaages from, make the list unique (no duplicates) and then create an email with all of the addresses in the list in the Bcc field?

% grep "^From: " /path/to/mailbox | grep -o "[+_[:graph:[EMAIL PROTECTED] [:graph:]]*" | sort | uniq

Will catch most any email address. Not that the class [:graph:] does not include some characters that are valid in email addresses; most notably, '+' and '_', so I added those manually to the match. If you are not worried about _ or + in email addresses, then

% grep "^From: " /path/to/mailbox  | grep -o "[EMAIL PROTECTED]" | sort | uniq


is tempting, and will work in most cases.


--
RTFM replies are great, but please specify exactly which FM to R



--
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <[EMAIL PROTECTED]>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
To unsubscribe, send mail to:  <[EMAIL PROTECTED]>

Reply via email to