Script to merge mailinglist archives

Mikko Heiskanen mikko at
Thu Jan 27 09:40:19 PST 2005

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

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
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.


More information about the freebsd-questions mailing list