[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nmh-workers] refile and moving sequences with messages
From: |
Ralph Corderoy |
Subject: |
Re: [Nmh-workers] refile and moving sequences with messages |
Date: |
Fri, 15 Mar 2013 14:43:34 +0000 |
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.
Re: [Nmh-workers] refile and moving sequences with messages, Kevin Layer, 2013/03/14
Re: [Nmh-workers] refile and moving sequences with messages, Kevin Layer, 2013/03/14
Re: [Nmh-workers] refile and moving sequences with messages, Robert Elz, 2013/03/14
Re: [Nmh-workers] refile and moving sequences with messages, Kevin Layer, 2013/03/15