[GRASS-dev] how to deal with the @mapset in scripts?
Glynn Clements
glynn at gclements.plus.com
Wed Jul 4 07:59:56 EDT 2007
Maciej Sieczka wrote:
> > Why do you actually need to use g.findfile? In most cases, you should
> > just pass the map name directly to the command, and let the command
> > handle the checking.
>
> It's better to check if the output exists in the initial stage of my
> script, than to let it run for an hour and then fail with an error that
> the output already exists in the end.
If the output map is specified by an option whose "gisprompt" setting
includes "new", g.parser will automatically ensure that it doesn't
exist unless --o[verwrite] is given or $GRASS_OVERWRITE == 1.
Also, if --o is passed to the script, GRASS_OVERWRITE will be set
automatically, so any commands invoked from the script will overwrite
output maps.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev
mailing list