[thelist] OT: postprocessor to strip some disclaimers out of digest mode

Kevin Martin evolt at brasscannon.net
Fri Jan 4 14:35:57 CST 2002


Happy New Year, evolt!

I've accumulated just over 9MB of The List in digest-mode in mbox format. 
It turns out that 56KB of that is "disclaimers" forced upon one of our 
beloved members by his workplace.  Before rolling the mailbox over to save
for future reference, I decided to mitigate that:

8<----- snip here
#!/usr/bin/perl
open(MPB, "thelist.save") || die "Error opening file.  $!\n";
while (<MPB>){
   if ($_ =~ "The principal place of business"){
	# throw away the next (TWENTY! FREAKING! LINES!)
	for($x=0 ; $x < 20 ; $x++){ <MPB> }
   }
   else { print ;}
}

8<----- snip here

It writes to standard output, so if you save it as "deburn.pl" the command 
line to use would be "perl deburn.pl > thelist.new"

Nothing personal, Martin... but next time you see your Legal guy, tell 
him "I spit in his general direction."  French accent optional. ;-)

<tip type="mail signatures" author="digger">
The standard .signature delimiter is a hard return, two hyphens, one
space, and another hard return: "-- ".  The trailing space is 
critical to recognizing the .sig delimiter.

Your email program should use it to *strip signatures when composing
replies*.  If it does not do that it is broken, regardless of any other 
capabilities it may boast.
</tip>
-- 
Kevin "digger" Martin <evolt at brasscannon.net>
               It's your return address, dammit, not your autobiography.




More information about the thelist mailing list