nmh-workers
[Top] [All Lists]

Workarounds for argument limits (was: Re: current work on nmh)

1998-06-21 12:01:38
On 17 June 1998 at 14:41, "Perry E. Metzger" <perry(_at_)piermont(_dot_)com> 
wrote:
Richard Coleman writes:
Yes, there is still a limit to the number of arguments you can give
on the command line.

This has been a significant problem at times. I'll routinely have 1000 
messages waiting for me if I've been gone a day or two, and if I do a 
"mark `pick ...`" on them, it routinely fails because of the argument
limits.

I haven't checked the nmh code, Perry.  But now that Richard has fixed
sequences to expand dynamically, could you use sequences instead?

        pick -seq foo -whatever...
        mark foo whatever...

If you can't use sequences, you might write a little Perl script that
searches the "pick" output for two or more message numbers in sequence
(like 860 861) and changes them into a range (like 860-861).  If you
want to get fancy, check the folder for non-existent messages; for
example, if pick outputs 860 862 864 and messages 861 and 863 don't
exist, you can make those three messages into the range 860-864.
Since this makes the two or more arguments into one, I think it
should help with the argument limit.  Sorry, I haven't tested this
recently, but I believe I used that trick years ago.

Jerry
-- 
Jerry Peek, jpeek(_at_)jpeek(_dot_)com, http://www.jpeek.com/~jpeek/


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