Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Oct 2002 10:23:47 +0000
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        FreeBSD Questions <freebsd-questions@FreeBSD.ORG>
Subject:   Re: Concatenating 2 or more mbox format files
Message-ID:  <20021028102347.GA7939@happy-idiot-talk.infracaninophi>
In-Reply-To: <100cae0100e3a5.100e3a5100cae0@mbox.com.au>
References:  <100cae0100e3a5.100e3a5100cae0@mbox.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Oct 28, 2002 at 08:49:43PM +1100, BSD Freak wrote:

> Does anyone have a quick and easy way to concatenate two or more MBOX=20
> format mailbox files? I tried:
>=20
> cat mboxfile1 mboxfile2 > newfile

That should work just fine.  mbox format just concatenates the
individual messages together: the separator is the character sequence
'\n\nFrom ' or in other words, a blank line followed by the envelope
'From ' header (ie. without a colon) -- which is the reason why if you
write:

=46rom at the beginning of a new paragraph in a message it typically
gets a '>' or some other character prepended.  Mail delivery agents
and user agents often add some extra headers:

    Status: RO
    Content-Length: 1463
    Lines: 5

right before the blank line that divides the headers from the message
body, but should be able to cope without.  Some mail user agents
(Netscape, Mozilla) will create a "dummy" first message in the mbox
file for their own purposes, but 2 seconds with a text editor can fix
that.

What precisely went wrong when you tried to concatenate the mbox files?

	Cheers,

	Matthew=20

--=20
Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
                                                      Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021028102347.GA7939>