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



NNAAMMEE
       gg..ffiilleennaammee   - Prints GRASS data base file names.
       _(_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..ffiilleennaammee
       gg..ffiilleennaammee hheellpp
       gg..ffiilleennaammee eelleemmeenntt==_n_a_m_e mmaappsseett==_n_a_m_e ffiillee==_n_a_m_e

DDEESSCCRRIIPPTTIIOONN
       _g_._f_i_l_e_n_a_m_e  is  designed for Bourne shell scripts that need to know the
       full UNIX file name for raster map  layers,  vector  files,  site  list
       files,  geographic  region  definition  (windows)  files, imagery group
       files, etc., in the GRASS data base.

OOPPTTIIOONNSS
       If the user runs _g_._f_i_l_e_n_a_m_e without command line arguments (i.e.,  sim-
       ply  types  gg..ffiilleennaammee),  this  program	will prompt the user for input
       using the standard _p_a_r_s_e_r.

   PPaarraammeetteerrss::
       eelleemmeenntt==_n_a_m_e
	      The name of a GRASS data base element  (i.e.,  directory	within
	      the GRASS mapset location).

       mmaappsseett==_n_a_m_e
	      The  name of a GRASS data base mapset.  As a convenience, a sin-
	      gle dot (.) can be used to designate the current mapset.

       ffiillee==_n_a_m_e
	      The name of a GRASS data base file.


OOUUTTPPUUTT
       _g_._f_i_l_e_n_a_m_e writes one line to  standard	output:  file='_f_u_l_l___f_i_l_e___p_a_t_h_-
       _n_a_m_e_'

       The  output  is	a _/_b_i_n_/_s_h command to set the variable specified by the
       file _n_a_m_e to the full UNIX path name for  the  data  base  file.   This
       variable  may  be  set in the _/_b_i_n_/_s_h as follows: eevvaall ``gg..ffiilleennaammee eellee--
       mmeenntt==_n_a_m_e mmaappsseett==_n_a_m_e ffiillee==_n_a_m_e``


NNOOTTEESS
       This routine generates the filename, but does not care if the file  (or
       mapset or element) exists or not.  This feature allows shell scripts to
       create new data base files as well as use existing ones.


       If the mapset is the current mapset, _g_._f_i_l_e_n_a_m_e	automatically  creates
       the  _e_l_e_m_e_n_t specified if it doesn't already exist.  This makes it easy
       to add new files to the data base without having  to  worry  about  the
       existence  of  the  required data base directories.  (This program will
       not create a new mapset, however, if that specified does not  currently
       exist.)


       The  program  exits with a 0 if everything is ok;  it exits with a non-
       zero value if there is an error, in  which  case  file=_'_f_u_l_l___f_i_l_e___p_a_t_h_-
       _n_a_m_e_' is not output.

SSEEEE AALLSSOO
       _g_._a_s_k

       _g_._f_i_n_d_f_i_l_e

       _g_._g_i_s_e_n_v

       _p_a_r_s_e_r

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_1_/_2_5 _0_5_:_4_5_:_3_3 _$



GRASS 5.0							 g.filename(1)
