#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of shell archive."
# Contents:  READ-ME prunemail
# Wrapped by jerry@ora.com on Thu Feb  4 14:31:50 1993
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'READ-ME' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'READ-ME'\"
else
echo shar: Extracting \"'READ-ME'\" \(358 characters\)
sed "s/^X//" >'READ-ME' <<'END_OF_FILE'
XThis is a fix to the prune-mail script distributed from ftp.ics.uci.edu.
XThe original could delete messages that did not have any message-id,
Xsuch as a message filed with Fcc. If there were multiple such messages
Xin a folder, one would be selected from the scan output and deleted.
XA grep for "<" and ">" solves the problem.
X
XRoger Corron
Xrc@boston.sgi.com
X
END_OF_FILE
if test 358 -ne `wc -c <'READ-ME'`; then
    echo shar: \"'READ-ME'\" unpacked with wrong size!
fi
# end of 'READ-ME'
fi
if test -f 'prunemail' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'prunemail'\"
else
echo shar: Extracting \"'prunemail'\" \(928 characters\)
sed "s/^X//" >'prunemail' <<'END_OF_FILE'
X#! /bin/csh -f
X# eliminate all messages in $1 with duplicate message-ids
X#
X# Subject: MH utility to delete duplicate messages in a folder
X# Date: Wed, 19 Aug 92 11:48:45 -0400
X# From: Bob Munck <munck@Stars.Reston.Unisys.COM>
X# 
X# Fixed to delete only messages with message-ids.
X# Roger Corron  <rc@boston.sgi.com>
X#
X# I debated using "$1" everywhere I have "+$1", since the user
X# would then need the "+" and would be following MH conventions
X# more closely.  I suppose a real convention-following utility
X# would also allow defaulting by using Path from ~/.mh-profile
X# to find context and getting Current-Folder from it.  
X
Xif ( ( $#argv == 0 ) || ( $1 == -help ) || ( $1 == -h ) ) then
X   echo 'USAGE: prune-mail folder'
X   exit 0
X   endif
Xfolder +$1
Xset s =  `scan +$1 -format "%4(putnumf(msg))	%{message-id}"|grep '.*<.*>.*' | sort +1|uniq -d +5|sed 's/	.*$//'`
Xif ( "$s" != "" ) then
X   rmm $s +$1
X   folder +$1
X   endif
END_OF_FILE
if test 928 -ne `wc -c <'prunemail'`; then
    echo shar: \"'prunemail'\" unpacked with wrong size!
fi
# end of 'prunemail'
fi
echo shar: End of shell archive.
exit 0
