Homepage > Man Pages > Category > General Commands
Homepage > Man Pages > Name > G


man page of g.findfile

g.findfile: Searches for GRASS data base files and sets variables for the shell.


g.findfile - Searches for GRASS data base files and sets variables for the shell.
g.findfile g.findfile help g.findfile [-n] element=string file=string [mapset=string] [--verbose] [--quiet] Flags: -n Don't add quotes --verbose Verbose module output --quiet Quiet module output Parameters: element=string Name of an element file=string Name of an existing map mapset=string Name of a mapset Default:


g.findfile is designed for Bourne shell scripts that need to search for mapset elements, including: raster, vector maps, region definitions and imagery groups. The list of element names to search for is not fixed; any subdirectory of the mapset directory is a valid element name. However, the user can find the list of standard GRASS element names in the file $GISBASE/etc/element_list. This is the file which g.remove/g.rename/g.copy use to determine which files need to be deleted/renamed/copied for a given entity type.


g.findfile writes four lines to standard output: name='file_name' mapset='mapset_name' file='unix_filename' fullname='grass_fullname' The output is /bin/sh commands to set the variable name to the GRASS data base file name, mapset to the mapset in which the file resides, and file to the full UNIX path name for the named file. These variables may be set in the /bin/sh as follows: eval 'g.findfile element=name mapset=name file=name' For example (raster map): eval 'g.findfile element=cell file=mymap'


If the specified file does not exist, the variables will be set as follows: name= mapset= fullname= file= The following is a way to test for this case: if [ ! "$file" ] then exit fi Note that region files are searched as element=windows.


g.ask g.filename g.gisenv g.mapsets parser
Michael Shapiro, U.S.Army Construction Engineering Research Laboratory Last changed: $Date: 2007-01-18 17:09:29 +0100 (Thu, 18 Jan 2007) $ Full index (C) 2003-2010 GRASS Development Team G.FINDFILE(1)

Copyright © 2011–2018 by topics-of-interest.com . All rights reserved. Hosted by all-inkl.
Contact · Imprint · Privacy

Page generated in 53.75ms.

doomsdaydude.de | brieftauben-versteigerung.com | plr.li