[GRASSLIST:4395] starting grass from shell for a batch job

dear listers,

I would like to apply a grass script to many locations and mapsets from a bash shell ; I tryed several ways of piping the script with the grass command such as :

#!/bin/sh

./grass_script | grass /data_directory/location/mapset

exit 0

But I get an error message for each grass command used within the grass_script, even though I can see grass starting and closing fine …

any ideas ? thank you very much,

eric pante (ericpante@hotmail.com)

I would like to apply a grass script to many locations and mapsets
from a bash shell

Switching mapsets with a GRASS session is easy. Locations are not as
easy. Maybe "safe" is a better word than "easy".

5.7: use g.mapset (not g.mapsets with an "s", grumble)

5.3: use the attached script for new mapsets, otherwise g.gisenv.

This is use at your own risk stuff.

Hamish

(attachments)

g.nm (1.1 KB)