From owner-freebsd-questions Mon Oct 28 2:25:24 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4248337B401 for ; Mon, 28 Oct 2002 02:25:23 -0800 (PST) Received: from smtp.infracaninophile.co.uk (ns0.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8AB4A43E75 for ; Mon, 28 Oct 2002 02:25:17 -0800 (PST) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [IPv6:::1]) by smtp.infracaninophile.co.uk (8.12.6/8.12.6) with ESMTP id g9SANrnX008377 for ; Mon, 28 Oct 2002 10:23:53 GMT (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost) by happy-idiot-talk.infracaninophile.co.uk (8.12.6/8.12.6/Submit) id g9SANldR008376 for freebsd-questions@FreeBSD.ORG; Mon, 28 Oct 2002 10:23:47 GMT Date: Mon, 28 Oct 2002 10:23:47 +0000 From: Matthew Seaman To: FreeBSD Questions Subject: Re: Concatenating 2 or more mbox format files Message-ID: <20021028102347.GA7939@happy-idiot-talk.infracaninophi> Mail-Followup-To: Matthew Seaman , FreeBSD Questions References: <100cae0100e3a5.100e3a5100cae0@mbox.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <100cae0100e3a5.100e3a5100cae0@mbox.com.au> User-Agent: Mutt/1.5.1i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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