sam-fans - fans of the sam editor
 help / color / mirror / Atom feed
From: mhw@minster.york.ac.uk (Mark H. Wilkinson)
To: sam-fans@hawkwind.utcs.toronto.edu (sam mailing list)
Subject: mailbox commands
Date: Fri, 21 Apr 1995 15:00:33 -0400	[thread overview]
Message-ID: <swordfish.798488168@minster.york.ac.uk> (raw)

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 <mhw@minster.york.ac.uk>  : Research student in user
University of York, England                 : interface management systems



                 reply	other threads:[~1995-04-21 18:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=swordfish.798488168@minster.york.ac.uk \
    --to=mhw@minster.york.ac.uk \
    --cc=sam-fans@hawkwind.utcs.toronto.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).