nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] Request for new command: addresses

2014-05-24 10:25:33
norm(_at_)dad(_dot_)org wrote:
The forwarded message, below, from Ralph Corderoy shows that there is already
code in the source to repl that does all that I'm asking for. So perhaps,
maybe, perchance, it might, I hope, not be very much trouble to write a
command: addresses.

The command would operate on one or more messages. Its arguments would be 
like
the arguments of almost all the nmh commands that operate on one more more
messages, with the default being cur. It would output, to its stdout, all the
addressees, including comments, of all the messages. There need be no
guaranteed order. Nor need there be any culling of duplicates. I don't 
require
but would not object to support of -cc all/to/cc/me -nocc all/to/cc/me.

does this do what you want?  i didn't address the leftover draft
folder that you and ralph mentioned, because that wasn't happening
for me.

paul

#!/bin/sh

if [ $# = 0 ]
then
    args=cur
else
    args=$(pick -noseq $*)
fi

for m in $args
do
    yes n | repl -cc all -query -editor false $m 2>/dev/null
done |
    sed -r 's/\<Reply to ([^?]+)\? /\1\n/g' |
    sort -u

=----------------------
 paul fox, pgf(_at_)foxharp(_dot_)boston(_dot_)ma(_dot_)us (arlington, ma, 
where it's 54.7 degrees)

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

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