From owner-freebsd-questions@FreeBSD.ORG Thu Jan 27 17:40:19 2005 Return-Path: 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 4FEAC16A4CE for ; Thu, 27 Jan 2005 17:40:19 +0000 (GMT) Received: from whitecortex.net (whitecortex.net [62.142.244.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id D8ECD43D2F for ; Thu, 27 Jan 2005 17:40:18 +0000 (GMT) (envelope-from mikko@whitecortex.net) Received: from localhost (localhost.localdomain [127.0.0.1]) by whitecortex.net (Postfix) with ESMTP id 862DC550D; Thu, 27 Jan 2005 19:40:17 +0200 (EET) Received: from whitecortex.net ([127.0.0.1]) by localhost (whitecortex.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 95139-09; Thu, 27 Jan 2005 19:40:17 +0200 (EET) Received: by whitecortex.net (Postfix, from userid 3127) id 2B746550C; Thu, 27 Jan 2005 19:40:17 +0200 (EET) From: Mikko Heiskanen To: Giorgos Keramidas In-Reply-To: <20050127123237.GB1286@orion.daedalusnetworks.priv> References: <1106824011.86743.21.camel@whitecortex.net> <20050127123237.GB1286@orion.daedalusnetworks.priv> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1106847616.95970.11.camel@whitecortex.net> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Thu, 27 Jan 2005 19:40:17 +0200 X-Virus-Scanned: by amavisd-new at whitecortex.net cc: freebsd-questions@freebsd.org Subject: Re: Script to merge mailinglist archives X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: mikko@whitecortex.net List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Jan 2005 17:40:19 -0000 Thanks everyone for the answers, but none of you really understood what I meant :) So let me rephrase. I have archived mailinglist mbox format files on my hd, downloaded from http://docs.freebsd.org/mail/ #ls 20021215.freebsd-questions 20040125.freebsd-questions 20021222.freebsd-questions 20040201.freebsd-questions 20021229.freebsd-questions 20040208.freebsd-questions 20021231.freebsd-questions 20040215.freebsd-questions 20030105.freebsd-questions 20040222.freebsd-questions 20030112.freebsd-questions 20040229.freebsd-questions 20030119.freebsd-questions 20040307.freebsd-questions 20030126.freebsd-questions 20040314.freebsd-questions 20030202.freebsd-questions 20040321.freebsd-questions 20030209.freebsd-questions 20040328.freebsd-questions 20030211.freebsd-questions 20040404.freebsd-questions 20030216.freebsd-questions 20040411.freebsd-questions 20030223.freebsd-questions 20040418.freebsd-questions 20030302.freebsd-questions 20040425.freebsd-questions 20030309.freebsd-questions 20040502.freebsd-questions 20030316.freebsd-questions 20040509.freebsd-questions 20030323.freebsd-questions 20040802.freebsd-questions 20030330.freebsd-questions 20041101.freebsd-questions 20030406.freebsd-questions 20041502.freebsd-questions 20030413.freebsd-questions 20041801.freebsd-questions 20030420.freebsd-questions 20042501.freebsd-questions Now as you can see, there are multiple mbox files per month. I would like to make a one-liner/script which would merge all the mboxes of every month to a single mbox representing that month. For the above mentioned files: #cat 200303* >> questions.0303 is how I do it manually, but doing this for each and every month for every year is painful (at least for lazy people like myself) So the question isn't about me, at this time, subscribed to mailinglist and wanting to put those files somewhere, I am already doing that with procmail, but I am not accepting mail from list always (actually quite rarely), so I would like to use the archives from the freebsd site, and after a while, just delete my own procmail created freebsd-questions mbox. Also isn't about unzipping the archives. Just to clarify. I'm 100% sure some awk guru can tell me a oneliner in 2 seconds. Mikko