[X-Unix] Parsing or splitting a text file

Thomas Juntunen juntunen at crc-inc.com
Wed Sep 28 13:47:10 PDT 2005


On 9/28/2005 14:16, "Richard Nagle" <cms01 at tampabay.rr.com> wrote:

> This From ???@???, is at the top of every email document,
> inside this large single text file.
> this file contains about 15,000 emails.

Sounds like the output from Emailchemy. It'll produce an mbox file full of
RFC822-style messages.

I wrote a small python program to separate such a file once. I used the
built-in library functions to read each chunk as an actual message, giving
me access to all the headers and letting me cope with weird character sets.
I don't know if I still have that script around anywhere, but if you've any
python experience it'd pretty easy to cobble something together.

Thomas Juntunen




More information about the X-Unix mailing list