On Thu, Oct 14, 2010 at 05:01:29PM -0500, Florin Iucha wrote: > On Thu, Oct 14, 2010 at 04:35:10PM -0500, Mike Miller wrote: > > An example would be that I have an mbox file (email messages) of 300 MB > > and containing 50,000 messages and I want to break it into 10 sections of > > at least 30 MB each (the tenth section would have to be a little smaller > > because there wouldn't be enough file left). > > > > I can do stuff like this to divide the file "mbox" into individual email > > messages, one per file... > > > > csplit -ksz mbox '/^From /' {*} > > I don't have an answer to your general question, but in this particular > instance csplit would not necessarily do what you want, as there might > be a paragraph starting with 'From' at the beginning of the line > (which vim e-mail syntax highlighting merrily bolds and colors) that > would result in a message split in two. Use 'formail' for this kind > of processing. When I've edited my mbox files with Emacs, anything that would match ^From that wasn't actually an e-mail delimiter was actually turned into ^>From. My understanding is that this is part of some spec somewhere. -- Scott Raun sraun at fireopal.org