From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from minster.york.ac.uk ([144.32.128.41]) by hawkwind.utcs.utoronto.ca with SMTP id <24104>; Fri, 21 Apr 1995 14:16:37 -0400 Message-ID: From: mhw@minster.york.ac.uk (Mark H. Wilkinson) Date: Fri, 21 Apr 1995 15:00:33 -0400 X-Face: Bsp[Ds(Y#/{==j:Cv'"IK4R^D0_z]{'OYtp2^EYqpG)88CsdBm&LJ{idLZWx}AKf}E4#|@4DT4cX3 ?!>aIVcxmd#1 X-Url: http://Dcpu1.cs.york.ac.uk:6666/~mhw/ X-Mailer: Mail User's Shell (7.2.5 10/14/92) To: sam-fans@hawkwind.utcs.toronto.edu (sam mailing list) Subject: mailbox commands While we're on the subject of mail, here's a command I use fairly regularly to strip the Received: lines out of mail headers. Obviously you can apply it to all your mailing list archives using the X command, hence freeing up lots of disk space. ,y/^[ ]*\n/g/^From .*\n(^[a-zA-Z\-]+:.*\n(( | ).*\n)*)+/x/^Received: .*\n(( | ).*\n)*/d or in other words, , # select the whole file y/^[ ]*\n/ # loop over the bits between all the blank lines g/^From .*\n(^[a-zA-Z\-]+:.*\n(( | ).*\n)*)+/ # ensure the current bit matches this regexp which # describes a mail header (I think!) x/^Received: .*\n(( | ).*\n)*/ # loop over Received: header lines, handling continuation # to subsequent lines d # delete -Mark. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Mark H. Wilkinson : Research student in user University of York, England : interface management systems