schaefer@ogicse.ogc.edu (Barton E. Schaefer) (02/06/90)
In article <131272@sun.Eng.Sun.COM> argv@sun.UUCP (Dan Heller) writes: } A small modification to bart's message -- he has: } > cmd cut 'save -f \!* /tmp/cut$$ | d' } > cmd paste 'save \!* -$ {`:d`} /tmp/cut$$ | d; Paste' } > cmd Paste 'merge -N /tmp/cut$$' } But this doesn't take into account the fact that you may already have } deleted messages. Instead, I recommend: } } cmd cut 'save -f \!* /tmp/cut$$ | d | set cut_msgs' } cmd paste 'save \!* -$ { $cut_msgs } /tmp/cut$$ | d; Paste' I hate to third-guess Dan's second-guess, but he's wrong -- my original suggestion specifically DOES take into account the fact that you may already have deleted messages, by omitting ALL deleted messages from the extra stuff that gets written to the temp file. (Why save the messages and merge them back in if they've been deleted already? All that does is effectively undelete them again!) Neither Dan's method nor mine will actually assign a specified number to the messages -- they just make sure the messages are in the order that you wanted *after* you update, and when you display headers in the "normal" way (i.e. without $show_deleted). -- Bart Schaefer "And here is the result of the Epilogue: God exists, by two falls to a submission. Next week, Larry Wall debates Randal Schwartz on use of the `grep' operator schaefer@cse.ogi.edu in Perl, three rounds, Marcus of Queensbury Rules."