I'll shut up soon.
mark -list -seq public -seq private -seq notexist |
awk -v RS=' ' -F - '
$0+0 {u = NF==2 ? $2 : $1; for (n = $1+0; n <= u; n++) print n}
'
I thought I may as well create this and see if it gets used.
$ cat ~/bin/mhinseq
#! /bin/sh
# Successfully exit only if the message is in the sequence.
# usage: mhinseq seq 42
mark -list -sequence "${1?}" |
awk -v RS=' ' -F - -v msg="${2?}" '
$0+0 &&
((NF == 1 && $1+0 == msg) ||
(NF == 2 && $1 <= msg && msg <= $2)) {f=1; last}
END {exit !f}
'
$
--
Cheers, Ralph.
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: check if message is in a particular sequence?, Ralph Corderoy |
|---|---|
| Next by Date: | Re: check if message is in a particular sequence?, Paul Fox |
| Previous by Thread: | Re: check if message is in a particular sequence?, Ralph Corderoy |
| Next by Thread: | Re: check if message is in a particular sequence?, Bob Carragher |
| Indexes: | [Date] [Thread] [Top] [All Lists] |