[GRASS-user] Envtl variables

Agustin Lobo Agustin.Lobo at ija.csic.es
Tue May 6 14:39:29 EDT 2008


Still nothing, look:

alobo at alobo-laptop:~$ eval 'g.gisenv'
GRASS_GUI=tcltk
GISDBASE=/home/alobo/grass/
LOCATION_NAME=FBBVA
MAPSET=BENI1
alobo at alobo-laptop:~$ echo $MAPSET

alobo at alobo-laptop:~$

Agus

Martin Landa wrote:
> Ciao,
> 
> 2008/5/6 Agustin Lobo <aloboaleu at gmail.com>:
>>  I'm using grass 6.2.3 on ubuntu hardy. I can't get the value
>>  of the grass environmental varaibles. If I do g.gisenv. I get:
>>  alobo at alobo-laptop:~$ g.gisenv
>>  GRASS_GUI=tcltk
>>  GISDBASE=/home/alobo/grass/
>>  LOCATION_NAME=FBBVA
>>  MAPSET=BENI1
>>
>>  but if I do echo $MAPSET I get a white line.
>>
>>  How can I get the values of the environmental variables? I'll
>>  need them for scripts.
> 
> use 'eval'
> 
> $ eval `g.gisenv`
> $ echo $MAPSET
> user1
> 
> see e.g.
> 
> http://trac.osgeo.org/grass/browser/grass/branches/develbranch_6/scripts/db.dropcol/db.dropcol#L89
> 
> Martin
> 

-- 
Dr. Agustin Lobo
Institut de Ciencies de la Terra "Jaume Almera" (CSIC)
LLuis Sole Sabaris s/n
08028 Barcelona
Spain
Tel. 34 934095410
Fax. 34 934110012
email: Agustin.Lobo at ija.csic.es
http://www.ija.csic.es/gt/obster


More information about the grass-user mailing list