procmail
[Top] [All Lists]

Re: reverse the order of messages in a mailbox?

1999-10-15 10:18:06
I had written,

T> Robert Borwn asked,

Make that "Brown".

T> #!/bin/sh
T>
T> FILENO=-01000000 formail -s \
T>     procmail -p DEFAULT=${PWD-`pwd`}/'$FILENO' /dev/null # from stdin
T> cat ./-* && rm -r ./-* # to stdout

Stan Ryckman asked,

R> (why -r?)

Because, as with Robert's last name, I made a typing error.  It should
be rm -f.  Thanks for catching that, Stan.

As to Stan's other concern, I was looking for the most streamlined solution.
Yes, such things as other files in the directory whose name starts with
hyphens or overrunning the command line length limit can interfere, but they
are rare.

<Prev in Thread] Current Thread [Next in Thread>