nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] A permute command for nmh 1.7 ?

2014-06-17 11:47:32
Norm, could you clarify the expected behavior?

Putting the specified messages into the specified order is trivial,
but where do they go in the overall order of the folder? If it is
the beginning or ending of the list, this sounds like a smple shell
script to me. If they are to be inserted into one another's slots,
I see no sane way to define how that would work.

Sample code for a script to move messages to the end of your folder:

#!sh
while [ $# -gt 0 ]; do
    case "$1" in
        [+@]*) FOLDER=$1;;
            *) MSGS="$MSGS $1";;
    esac
    shift
done

if [ -z "$FOLDER" ]; then
   FOLDER=`folder -fast`
fi

for MSG in $MSGS do
  refile $MSG +$FOLDER
done

folder -pack +$FOLDER

_______________________________________________
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>