nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] Getting a list of message numbers into a script

2014-07-21 20:29:35
David Levine <levinedl(_at_)acm(_dot_)org> writes:

Norm wrote:

Is there a good way to get a list of message numbers into a bash script,
without the prefixes normally attached by mhpath and mark. What I've been
doing is something ugly like:


     $(mhpath first:3 17 last:4| sed -e "s@.*/@@" -e "s@\n@@"

Is there a cleaner way?

Yes, use pick:

    $(pick first:3 17 last:4)

David

Or scan:

    $ scan -format '%(msg)' +done first:3 17 last:4
    1
    2
    3
    17
    4482
    4483
    4484
    4485


_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers


-- 
Bill Wohler <wohler(_at_)newt(_dot_)com> aka 
<Bill(_dot_)Wohler(_at_)nasa(_dot_)gov>
http://www.newt.com/wohler/
GnuPG ID:610BD9AD


_______________________________________________
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>
  • Re: [Nmh-workers] Getting a list of message numbers into a script, Bill Wohler <=