g.gisenv(1)		      Grass User's Manual		   g.gisenv(1)



NNAAMMEE
       gg..ggiisseennvv  - Outputs the user's current GRASS variable settings.
       _(_G_R_A_S_S _F_i_l_e _M_a_n_a_g_e_m_e_n_t _P_r_o_g_r_a_m_)

SSYYNNOOPPSSIISS
       gg..ggiisseennvv
       gg..ggiisseennvv [_v_a_r_i_a_b_l_e___n_a_m_e]

DDEESSCCRRIIPPTTIIOONN
       When  a user runs GRASS, certain variables are set specifying the GRASS
       data base, location, mapset, peripheral	device	drivers,  etc.,  being
       used  in  the  current GRASS session.  These variable name settings are
       recognized as long as the user is running a GRASS session.

OOPPTTIIOONNSS
       No prompts are given to the user when running _g_._g_i_s_e_n_v.	If run without
       arguments, _g_._g_i_s_e_n_v lists all of the user's current GRASS variable set-
       tings.  Results are sent to standard output, and may  look  like  this:
       GISDBASE=/usr/grass5/data

       LOCATION_NAME=spearfish

       MAPSET=PERMANENT

       In  this  example,  the	full  path name of the user's current location
       (i.e., $LOCATION_NAME) is /usr/grass5/data/spearfish, and the full path
       name    of    the    user's   current   mapset	(i.e.,	 $MAPSET)   is
       /usr/grass5/data/spearfish/PERMANENT.


       If the user specifies  a  _v_a_r_i_a_b_l_e___n_a_m_e	on  the  command  line	(e.g.,
       gg..ggiisseennvv  MMAAPPSSEETT), only the value for that particular GRASS variable is
       output to standard output.   Possible  variable	names  depend  on  the
       user's system.


       While  other variables may be associated with each GRASS session (e.g.,
       DIGITIZER, PAINTER, DISPLAY, and other variables), those  stated  below
       are essential.

       _G_I_S_D_B_A_S_E
	      The  $GISDBASE is a directory in which all users' GRASS data are
	      stored.  Within the $GISDBASE, data are segregated  into	subdi-
	      rectories  (called "locations") based on the map coordinate sys-
	      tem used and the geographic extent of the data.  Each "location"
	      directory  itself contains subdirectories called "mapsets"; each
	      "mapset" stores "data base elements" -- the  directories	(e.g.,
	      the  cell,  cellhd,  dig, etc., directories) in which GRASS data
	      files are actually stored.

       _L_O_C_A_T_I_O_N___N_A_M_E
	      The user must choose to work with the data under a single  GRASS
	      location	within	any given GRASS session; this location is then
	      called the _c_u_r_r_e_n_t _G_R_A_S_S _l_o_c_a_t_i_o_n, and is specified by the vari-
	      able  $LOCATION_NAME.  The $LOCATION_NAME is the GRASS data base
	      location whose data will	be  affected  by  any  GRASS  commands
	      issued  during the user's current GRASS session, and is a subdi-
	      rectory of the current $GISDBASE.  Each "location" directory can
	      contain  multiple  "mapset"  directories	(including the special
	      mapset PERMANENT).  Maps	stored	under  the  same  GRASS  LOCA-
	      TION_NAME  (and/or  within  the  same  MAPSET) must use the same
	      coordinate system and typically fall within  the	boundaries  of
	      the same geographic region (aka, "location").

       _M_A_P_S_E_T Each  "mapset"  contains	a  set	of  maps relevant to the LOCA-
	      TION_NAME directory in which it appears.	Each LOCATION_NAME can
	      contain  multiple  mapsets.   (Mapsets which fall under the same
	      LOCATION_NAME all contain data geographically  relevant  to  the
	      LOCATION_NAME,  and  all	store  data in the same map coordinate
	      system.  Frequently, maps are placed into different  mapsets  to
	      distinguish file ownership -- e.g., each user might have his own
	      mapset, storing any maps that he has created and/or are relevant
	      to  his  work.)  During each GRASS session, the user must choose
	      one mapset to be the _c_u_r_r_e_n_t _m_a_p_s_e_t;  the current mapset setting
	      is  given  by  $MAPSET, and is a subdirectory of $LOCATION_NAME.
	      During a single GRASS session, the user can use  available  data
	      in  any  of  the	mapsets stored under the current LOCATION_NAME
	      directory that are in the user's mapset search path and accessi-
	      ble  by  the  user.  However, within a single GRASS session, the
	      user only has _w_r_i_t_e access to  data  stored  under  the  _c_u_r_r_e_n_t
	      _m_a_p_s_e_t (specified by the variable $MAPSET).


       Each "mapset" stores GRASS data base elements (i.e., the directories in
       which GRASS data files are stored).  Any maps created  or  modified  by
       the  user in the current GRASS session will be stored here.  The MAPSET
       directory PERMANENT is generally reserved for the set of maps that form
       the base set for all users working under each LOCATION_NAME.

       Once  within  a GRASS session, GRASS users have access only to the data
       under a single GRASS data base directory (the _c_u_r_r_e_n_t _G_R_A_S_S _d_a_t_a  _b_a_s_e,
       specified  by  the  variable $GISDBASE), and to a single GRASS location
       directory (the _c_u_r_r_e_n_t  _l_o_c_a_t_i_o_n,  specified  by  the  variable	$LOCA-
       TION_NAME).  Within a single session, the user may only _m_o_d_i_f_y the data
       in the _c_u_r_r_e_n_t _m_a_p_s_e_t (specified by the variable $MAPSET), but may  _u_s_e
       data available under other mapsets under the same LOCATION_NAME.


       All  of	these  names must be legal names on the user's current system.
       For UNIX users, names less than 14 characters and  containing  no  non-
       printing or space codes are permissible.  Examples of permissible names
       include: _o_n_e, _m_y_m_a_p, _V_e_G_e___m_a_p, and _1___f_o_r___m_e.  The underscore  character
       can safely be used in place of a blank for multiple-word names.

NNOOTTEESS
       The  output  from  _g_._g_i_s_e_n_v  when invoked without arguments is directly
       usable by /bin/sh.  The following command will cast each variable  into
       the UNIX environment:


       eevvaall ``gg..ggiisseennvv``



       This works only for _/_b_i_n_/_s_h. The format of the output is not compatible
       with other UNIX shells.

SSEEEE AALLSSOO
       _g_._a_c_c_e_s_s

       _g_._a_s_k

       _g_._f_i_l_e_n_a_m_e

       _g_._f_i_n_d_f_i_l_e

       _g_._m_a_p_s_e_t_s

AAUUTTHHOORR
       Michael Shapiro, U.S.Army Construction Engineering Research Laboratory

       _L_a_s_t _c_h_a_n_g_e_d_: _$_D_a_t_e_: _2_0_0_2_/_0_8_/_1_2 _2_1_:_4_5_:_1_8 _$



GRASS 5.0							   g.gisenv(1)
