[GRASS-dev] Re: [GRASS-user] Re: Calculating standard error of many maps?

Glynn Clements glynn at gclements.plus.com
Wed Feb 11 16:20:32 EST 2009


Markus Neteler wrote:

> > Regarding command-line limits: is it worth extending G_parser() to
> > allow arguments to be read from a file? E.g. "r.series @args.txt".
> >
> > It was quite common for this feature to be added to DOS ports of Unix
> > programs, as DOS had a much lower limit than Unix on the maximum
> > length of a command line.
> 
> Just to understand - does this allow to exceed the command limits?
> Then it would be pretty helpful (as text files are easy to generate).

The idea is to have G_parser() recognise arguments of the form
@filename, and read the file, treating each line the same way that it
would treat an argv[i].

IOW, the commands:

	r.series @args.txt ...
and:
	r.series `cat args.txt` ...

would be equivalent[1], except that the former wouldn't run the risk
of exceeding any OS limit on the maximum length of a command line.

[1] Actually, they would interpret whitespace differently. The logical
implementation of @filename would treat each line as a single
argument. This is probably the most useful behaviour if you're
generating the arguments with commands, and eliminates the need to
provide a quoting mechanism (so long as you don't need to allow
newlines within an argument).

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-user mailing list