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

Tye Parzybok tyep at metstat.com
Mon Sep 20 07:55:41 EDT 2004


Ahh, I found the problem, I was defining the GISBASE wrong. I had as:
setenv GISBASE /usr/local/bin/grass5
and it should be:
setenv GISBASE /usr/local/grass5
...and now it works!! Thank you for your help!

-Tye

Sandro Klippel wrote:

> PATH ?
>
> setenv PATH /path-to-grass/bin:/path-to-grass/scripts
>
> Em Sex 17 Set 2004 17:17, você escreveu:
> > 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):
> >
> > #!/bin/csh
> >
> > 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 LOCATION_NAME POLARS
> > setenv MAPSET stage4
> >
> > g.list rast
> >
> > exit
> >
> >
> > 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
> > --------------------------------
>
> --
> Instituto IGARÉ
> http://geocities.yahoo.com.br/institutoigare
> e-mail: institutoigare at yahoo.com.br

--
--------------------------------
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
--------------------------------




More information about the grass-user mailing list