nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] [PATCH] scan message numbers from stdin

2008-08-18 12:11:55
eric wrote:
If `-' is specified for
.RI msgs
.B scan
will read message numbers from the standard input and scan those.  Each line
must have exactly one message number.  Lines beginning with `+' are ignored.

So, you want

  printf '%s\n' 1 2 3 4 5 | scan -

any particular reason for this restriction?  i can't think of a
use case for 'echo 1 2 3 | scan', but when i do, i'll be surprised
that it doesn't work.


but that isn't what the implementation does.

...I do think that this isn't a good idea.

I think that it would be nice if 'scan 4 1 2' actually output the messages
in the order stated on the command line. I also think that it would be

I, too, would rather 'scan 3 4' print the lines in that order
(first 3, then 4).  In any case, having scan - sort the messages
entirely defeats its purpose (scan as you go).

i don't think default scan behavior should change w.r.t. 
sorting/uniq'ing its arguments.  an option that explicitly
suppressed the sorting wouldn't be a bad thing, though -- i've
sometimes wanted the messages in as-specified order.

however, since as you say, the message numbers shouldn't be
sorted in the stdin case, perhaps this would obviate the need for
explicit support for unsorted messages elsewhere.  (i.e., if you
want the messages in as-specified order, then use "echo 1 2 3 |
scan".)

paul
=---------------------
 paul fox, pgf(_at_)foxharp(_dot_)boston(_dot_)ma(_dot_)us (arlington, ma, 
where it's 79.3 degrees)


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

<Prev in Thread] Current Thread [Next in Thread>