Hi,

Paul Fox wrote:
> i think this "one-liner" will show all sequences containing message $msg:
> 
>     msg=1234
>     mark -list |
>     sed -e 's/^/eval echo /'  \
>       -e 's/[[:digit:]]\+-[[:digit:]]\+/$(seq &)/g' \
>       -e 's/-/ /g' |
>     sh |
>     sed -n -e '/\<'$msg'\>/s/:.*//p'

For the given messages, what sequences contain all of them.

    all='first 42 3141'
    mark |
    sed 's/: .*//; /^cur$/d; /^lp$/d' |
    while read -r s; do
        pick -seq lp $all > >(grep -Ev '^[0-9]+ hits?$') &&
        mark -seq lp -del $s &&
        mark -seq lp -list |
        sed -n '/: $/s/.*/'$s'/p';
    done

Not tested much, most of my sequences are mutually exclusive.

Cheers, Ralph.

_______________________________________________
Nmh-workers mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/nmh-workers

Reply via email to