From owner-freebsd-questions@FreeBSD.ORG Thu Jan 27 13:26:31 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 0569016A4CE for ; Thu, 27 Jan 2005 13:26:31 +0000 (GMT) Received: from smtp807.mail.sc5.yahoo.com (smtp807.mail.sc5.yahoo.com [66.163.168.186]) by mx1.FreeBSD.org (Postfix) with SMTP id 7F0EC43D55 for ; Thu, 27 Jan 2005 13:26:30 +0000 (GMT) (envelope-from krinklyfig@spymac.com) Received: from unknown (HELO smogmonster.com) (jtinnin@pacbell.net@64.173.27.163 with login) by smtp807.mail.sc5.yahoo.com with SMTP; 27 Jan 2005 13:26:30 -0000 From: Joshua Tinnin To: freebsd-questions@freebsd.org Date: Thu, 27 Jan 2005 05:26:27 -0800 User-Agent: KMail/1.7.2 References: <1106824011.86743.21.camel@whitecortex.net> <20050127123237.GB1286@orion.daedalusnetworks.priv> In-Reply-To: <20050127123237.GB1286@orion.daedalusnetworks.priv> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200501270526.28520.krinklyfig@spymac.com> cc: Giorgos Keramidas cc: Mikko Heiskanen Subject: Re: Script to merge mailinglist archives X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Jan 2005 13:26:31 -0000 On Thursday 27 January 2005 04:32 am, Giorgos Keramidas wrote: > On 2005-01-27 13:06, Mikko Heiskanen wrote: > > 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. > > If you have the mail archives of every week in Unix mbox format, you > can simply `join' the archives by cat(1): > > % cd ~/mail-archive/freebsd/questions/2004/10 > % cat * > /tmp/freebsd-questions > > If that is not sufficient for your purpose or you just feel like a > bit of extra fun is ok, you can use formail(1) and procmail(1) to do > custom filtering of your own. Just set up a custom filter list in a > file of your choise, and pipe the messages to formail/procmail: > > % cd ~/mail-archive/freebsd/questions/2004/10 > % cat * | formail -s procmail /tmp/customfilter Oh, OK, the OP is working with archives from the list site. if you have the archives in txt files from the http://lists.freebsd.org/pipermail/freebsd-questions/ page, you can do this, just for an example this is what I have in ~/tmp after unzipping the files: % ls -l total 22336 -rw-r--r-- 1 krinklyfig 1001 6315547 Jan 27 04:58 2004-December.txt -rw-r--r-- 1 krinklyfig 1001 6173698 Jan 27 04:58 2004-November.txt -rw-r--r-- 1 krinklyfig 1001 5654084 Jan 27 04:58 2004-October.txt -rw-r--r-- 1 krinklyfig 1001 4622812 Jan 27 04:58 2004-September.txt % cd ~/tmp % find . -type f | grep "Oct\|Nov\|Dec" | xargs cat > fbsd-q-04-oct-dec-arc % ls -l total 40080 -rw-r--r-- 1 krinklyfig 1001 6315547 Jan 27 04:58 2004-December.txt -rw-r--r-- 1 krinklyfig 1001 6173698 Jan 27 04:58 2004-November.txt -rw-r--r-- 1 krinklyfig 1001 5654084 Jan 27 04:58 2004-October.txt -rw-r--r-- 1 krinklyfig 1001 4622812 Jan 27 04:58 2004-September.txt -rw-r--r-- 1 krinklyfig 1001 18143329 Jan 27 05:21 fbsd-q-04-oct-dec-arc (this will wrap in this email, but you get the idea) You can further customize what is concatenated by using different expressions in grep. If you want to search within the files, piping to procmail would probably work best, as already suggested, which could be added to the above command. - jt