From owner-freebsd-questions@FreeBSD.ORG Thu Jan 27 11:06:53 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 DCCE616A4CE for ; Thu, 27 Jan 2005 11:06:53 +0000 (GMT) Received: from whitecortex.net (whitecortex.net [62.142.244.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4B8D643D1D for ; Thu, 27 Jan 2005 11:06:53 +0000 (GMT) (envelope-from mikko@whitecortex.net) Received: from localhost (localhost.localdomain [127.0.0.1]) by whitecortex.net (Postfix) with ESMTP id F146A550D for ; Thu, 27 Jan 2005 13:06:51 +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 93145-06 for ; Thu, 27 Jan 2005 13:06:51 +0200 (EET) Received: by whitecortex.net (Postfix, from userid 3127) id 967EB550C; Thu, 27 Jan 2005 13:06:51 +0200 (EET) From: Mikko Heiskanen To: questions@freebsd.org Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1106824011.86743.21.camel@whitecortex.net> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Thu, 27 Jan 2005 13:06:51 +0200 X-Virus-Scanned: by amavisd-new at whitecortex.net Subject: 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 11:06:54 -0000 Hi list. I've found archives of freebsd-questions mailinglist very useful. But I have found them difficult to search, as in one month there can be many archives, not just one per month. So I would like to merge all archives of the same month into a single mailbox containing all messages sent that month (I am aware this file could come quite large). I have a feeling this can be a simple shellscript/one-liner with some awk magic, but I am having hard time figuring out how to tackle the problem. I should somehow be able to compare a list of files which match the month, and cat >> results to a file whose filename comes that matched months last 2 digits of year+ 2 digits of month. And this for all the files in a directory containing, say, archives from 1998 -> 2005. Easy? Mikko