execute GRASS commands outside of GRASS?

P. Watson Phil.Watson at newcastle.ac.uk
Wed Jul 28 09:16:23 EDT 1993


>Is it possible to run GRASS commands from a non-GRASS program or from the 
>system prompt?  If so, what extra details do I need to track?

>I have looked at some of the shell scripts in the src/scripts directory but
>they expect to be called while GRASS is running (from the GRASS prompt).

I wanted to this a while back and got the following script working.  I then
decided that I didn't really want to do it at all so I havn't much experience
to tell you about ...  I doubt that all the setenv's are actually needed.

---------------   cut here  ---------------
#!/usr/local/bin/tcsh

set path= (/user/grass4.1beta/sun4/bin /user/grass4.1beta/sun4/scripts /user/grass4.1beta/sun4/garden/bin /user/grass4.1beta/sun4/alpha/bin /usr/local/bin /usr/bin /usr/ucb /etc /usr/etc /usr/lib)
setenv GISBASE /user/grass4.1beta
setenv GISDBASE /home/grass
setenv GISRC dss_grassrc
setenv LOCATION /home/grass/tyne/phil
setenv LOCATION_NAME tyne
setenv MAPSET phil

g.list rast
----------------------------------------------


Phil Watson (an ozzie in exile)   |  _--_|\  | CLUWRR                       |
phil.watson at newcastle.ac.uk       | /      \ | Agric & Enviromental Science |
                                  | \_.--._/ | Uni of Newcastle-Upon-Tyne   |
Phone: (091) 222 7503             |       v  | England, NE1                 |





More information about the grass-user mailing list