[GRASSLIST:480] Re: where is $LOCATION set

I am having trouble with the environment variables.

They aren't set by default any more. If you want to use them,

g.gisenv will list current GRASS state (from the ~/.grassrc5 file)

and

eval `g.gisenv` will "activate" the variables listed in g.gisenv.

so

eval `g.gisenv`
cd $GISDBASE/$LOCATION_NAME

should work.

set or echo $[tab][tab] will list currently available enviro vars

Hamish

eval `g.gisenv` will "activate" the variables listed in g.gisenv.

For my fellow Luddites still running tcsh instead of bash, "eval `g.gisenv`" doesn't work. But placing these lines into .grass.cshrc

eval `g.gisenv | awk -F= '{print "setenv " $1 " " $2}'`

alias cdmap 'cd $GISDBASE/$LOCATION_NAME/$MAPSET'
alias cdloc 'cd $GISDBASE/$LOCATION_NAME'

does the trick quite nicely. Thanks Erin for the question, and 2 unnamed respondents for the answers and nudge!

H