[GRASSLIST:4372] Setting GRASS environment variables in c-shell script

Tye Parzybok tyep at metstat.com
Fri Sep 17 16:17:24 EDT 2004

I'd like to run some GRASS commands externally through a c-shell script.
In other words, have the script start up GRASS, run a function, then
close GRASS. As I understand it, I need to set the GRASS environment
variables first, then I can start executing GRASS commands...but I'm
having trouble doing that. Can anyone identify something that may be
causing this script to not work (i.e. all I get is: "g.list: Command not
found" when I run it):


echo "GISDBASE: /home/dad/grass"                     > $HOME/.grassrc5
echo "LOCATION_NAME: POLARS"                         >> $HOME/.grassrc5
echo "MAPSET: stage4"                                >> $HOME/.grassrc5
echo "DIGITIZER: none"                               >> $HOME/.grassrc5
echo "GRASS_GUI: text"                               >> $HOME/.grassrc5

setenv GIS /usr/local/bin/grass5
setenv GISBASE /usr/local/bin/grass5
setenv GISDBASE /home/dad/grass
setenv GISRC /home/dad/.grassrc5
setenv LOCATION /home/dad/grass/POLARS/stage4
setenv MAPSET stage4

g.list rast


Thanks much!

-Tye Parzybok

Tye W. Parzybok, President
Metstat, Inc.
Windsor, Colorado
voice: 970.686.1253
fax: 208.728.7256
email: tyep at metstat.com
web: www.metstat.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20040917/0c8e82a7/attachment.html

More information about the grass-user mailing list