Path: utzoo!attcan!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!ace.ee.lbl.gov!leres From: leres@ace.ee.lbl.gov (Craig Leres) Newsgroups: comp.mail.mh Subject: unrmm command Message-ID: <324@helios.ee.lbl.gov> Date: 23 Jun 88 23:40:07 GMT Sender: usenet@helios.ee.lbl.gov Reply-To: leres@helios.ee.lbl.gov (Craig Leres) Organization: Lawrence Berkeley Laboratory, Berkeley Lines: 23 On occasion, I rmm a message and then change my mind. I just wrote the following script which allows you to safely un-rmm a message (without having to root around in the folder directory). It's kinda like inc in that the message reappears as the last message in the folder. Craig #!/bin/csh -f set new=`mhpath new` if ($#argv > 0) then set old=`echo $new//\#$1 | sed -e 's,/[0-9][0-9]*//,/,'` if ( ! -r $old ) then echo "unrmm: message $1 doesn't exist" exit 1 endif else set old=`mhpath .` if ( ! -r $old ) then echo "unrmm: no cur message" exit 1 endif endif mv -i $old $new if ($status == 0) scan last