Path: utzoo!attcan!uunet!husc6!bloom-beacon!tut.cis.ohio-state.edu!mandrill!hal!ncoast!allbery
From: allbery@ncoast.UUCP (Brandon S. Allbery)
Newsgroups: comp.mail.mh
Subject: Re: rmm[proc] replacement
Message-ID: <8215@ncoast.UUCP>
Date: 5 Jul 88 01:22:11 GMT
References: <8806262201.AA28641@intrepid.ecn.purdue.edu> <22799.583436802@hplpm>
Reply-To: allbery@ncoast.UUCP (Brandon S. Allbery)
Followup-To: comp.mail.mh
Organization: Cleveland Public Access UN*X, Cleveland, Oh
Lines: 36

As quoted from <22799.583436802@hplpm> by marvit%hplpm@HPLABS.HP.COM (Peter Marvit):
+---------------
| OK, here's my proven solution (tested for at least one hour).  In your
| .mh_profile, include the line:
| 
| 	rmmproc: /users/marvit/bin/my-rmm
| 
| or some suitable pathname to the following shell script:
| 
| until [ -z "$1" ]
| do
| 	/bin/mv $1 `mhpath +waste new`
| 	shift
| done
+---------------

May I suggest that a relatively minor change will allow for "rmm +waste ..."
to work in a more useful way?

folder -push -nolist		# can these two lines
folder -noprint +waste		# be combined?
here=`mhpath`
until [ -z "$1" ]; do
	if [ "`basename \"$1\"`" = "$here" ]; then
		rm "$1"
	else
		mv "$1" "`mhpath new`"
	fi
done
folder -pop -nolist

This should (not tested, but should be close) arrange to delete the message
if and only if it is already in +waste; otherwise, it is moved to +waste.
-- 
Brandon S. Allbery, uunet!marque!ncoast!allbery			DELPHI: ALLBERY
	    For comp.sources.misc send mail to ncoast!sources-misc