PeterCap has asked for the wisdom of the Perl Monks concerning the following question:
I have a number of e-mail messages (envelope, headers, body, sometimes including base64-encoded attachments) which are spread out among an arbitrary number of text files. In most cases, there are multiple messages in each text file.
I want to subset each large file so that each e-mail is saved to its own file. So, if the source file is "mails.txt" containing three messages, I want to create (e.g.) mails_000001.txt, mails_000002.txt, and mails_000003.txt.
I had kludged together a bash script that performed this operation thusly:
Thanks!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Subsetting text files containing e-mails
by GrandFather (Saint) on Jan 25, 2012 at 09:52 UTC | |
by PeterCap (Initiate) on Jan 27, 2012 at 07:19 UTC | |
by GrandFather (Saint) on Jan 27, 2012 at 07:34 UTC | |
by PeterCap (Initiate) on Jan 27, 2012 at 08:26 UTC | |
by GrandFather (Saint) on Jan 27, 2012 at 09:17 UTC | |
|
Re: Subsetting text files containing e-mails
by locked_user sundialsvc4 (Abbot) on Jan 26, 2012 at 14:43 UTC | |
by PeterCap (Initiate) on Jan 27, 2012 at 07:51 UTC |