Thread View: comp.mail.mh
1 messages
1 total messages
Started by Roger Corron
Thu, 07 Jan 1993 14:27
Fixed prune-mail script
Author: Roger Corron
Date: Thu, 07 Jan 1993 14:27
Date: Thu, 07 Jan 1993 14:27
38 lines
1891 bytes
1891 bytes
Mail to Bob Munck (the author) bounces, and this is probably of general
interest, so...
This is a fix to the prune-mail script distributed from ftp.ics.uci.edu.
The original could delete messages that did not have any message-id,
such as a message filed with Fcc. If there were multiple such messages
in a folder, one would be selected from the scan output and deleted.
A grep for "<" and ">" solves the problem.
Roger Corron
rc@boston.sgi.com
#! /bin/csh -f
# eliminate all messages in $1 with duplicate message-ids
#
# Subject: MH utility to delete duplicate messages in a folder
# Date: Wed, 19 Aug 92 11:48:45 -0400
# From: Bob Munck <munck@Stars.Reston.Unisys.COM>
#
# Fixed to delete only messages with message-ids.
# Roger Corron <rc@boston.sgi.com>
#
# I debated using "$1" everywhere I have "+$1", since the user
# would then need the "+" and would be following MH conventions
# more closely. I suppose a real convention-following utility
# would also allow defaulting by using Path from ~/.mh-profile
# to find context and getting Current-Folder from it.
if ( ( $#argv == 0 ) || ( $1 == -help ) || ( $1 == -h ) ) then
echo 'USAGE: prune-mail folder'
exit 0
endif
folder +$1
set s = `scan +$1 -format "%4(putnumf(msg)) %{message-id}"|grep '.*<.*>.*' | sort +1|uniq -d +5|sed 's/ .*$//'`
if ( "$s" != "" ) then
rmm $s +$1
folder +$1
endif
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads