Ciao,

2008/5/6 Agustin Lobo <[EMAIL PROTECTED]>:
>  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:
>  [EMAIL PROTECTED]:~$ 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

-- 
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa *
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Reply via email to