[GRASSLIST:5924] Re: grass5 non-interactively

Glynn Clements glynn.clements at virgin.net
Mon Mar 31 04:50:17 EST 2003


Miroslav Sedivy wrote:

> I would like to ask how to run grass5, execute a perl script in it and
> exit it non-interactively (e.g. from crontab). I have tried to edit
> ~/.grass5.bashrc (copied the .bashrc file saved in the location/mapset
> directory and added perl script execution line and 'exit' command),
> but it doesn't work now.
> 
> The location/mapset environment variables are correctly defined, the
> grass5 starts without the initial dialogue and gets immediately to
> grass shell, but then it does not run my perl script.

Setting the environment variable SHELL to the path to the perl script
should work, e.g.

	SHELL=/path/to/script.pl grass5 /path/to/dbase/location/mapset

-- 
Glynn Clements <glynn.clements at virgin.net>




More information about the grass-user mailing list