On 12 September 2012 at 8:16, [email protected] wrote:

> I'm mostly interested in answering the question "which folder
> did the recent msg FROM so-and-so@somewhere go into?"

Maybe the attached script is a useful way to answer that question 
after the fact?  The script has other uses too, as it's intended to
run 'pick' across a set of folders.

Cheerio....

--
Kevin

#!/bin/sh

# $Id: pickf,v 1.2 2012/05/08 02:04:54 kevinc Exp kevinc $

PATH="/usr/local/bin/mh:${PREFIX}/bin:${HOME}/.${U_SYSNAME}/2.4.21/${U_MACHINE}/bin:${HOME}/.${U_SYSNAME}/2.4.21/${U_MACHINE}/sbin:/login/kevinc/bin/mh:/stdapps/mh/bin:/usr/local/bin:/usr/ucb:/bin:/usr/bin:/usr/5bin"

export PATH

SCRIPT=`basename $0`

args="-nolist"
defaultSearch="-search $1"
defaultSeq="-seq temp"

while test ! -z "$1"
do
        case "$1" in
                +*)
                        folderList="$folderList $1"
                        shift
                        ;;
                -from*)
                        # this should really check for a 2nd argument, in a 
rush now
                        args="$args $1 $2"
                        defaultSearch=""
                        shift
                        shift
                        ;;
                -list*)
                        shift
                        ;;
                -search*)
                        args="$args $1 $2"
                        defaultSearch=""
                        shift
                        shift
                        ;;
                -seq*)
                        seq="$2"
                        args="$args $1 $2"
                        defaultSeq=""
                        shift
                        shift
                        ;;
                -subj*)
                        args="$args $1 $2"
                        defaultSearch=""
                        shift
                        shift
                        ;;
        esac
        # echo "        args is '$args'"
done

for folder in $folderList
do
        echo $folder ==============================
        pick $folder $defaultSeq $defaultSearch $args
        if( test "$?" == 0 ) then
                scan -width 80 ${folder} ${seq}
        fi
done

exit

# Set editor options
# vim:sw=4:ts=4:se nospell:
_______________________________________________
Nmh-workers mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/nmh-workers

Reply via email to