NAME

g.mlist - Apply regular expressions and wildcards to g.list

SYNOPSIS

g.mlist
g.mlist help
g.mlist [-r] [type=string] [mapset=string] [sep=string] [pattern=string]

Flags:

-r
use regular expression instead of wildcard

Parameters:

type=string
data type (rast, vect, or sites)
Default: rast
mapset=string
mapset to list (default: current mapset search path)
sep=string
output separator (default: newline)
pattern=string
map name search pattern, must be 'quoted'. (default: all)
Default: *

DESCRIPTION

g.mlist is an extended version of g.list which provides regular-expression and wildcard support. g.mlist will only print map names and an optional separator, without extraneous output. In addition, map search is also available.

EXAMPLES

Wildcards:

List all vector maps starting with letter "r":
g.mlist type=vect "r*"

Regular expressions:


Print out all soils map with "soils" in their name:
g.mlist -r type=rast '^soils'

Print out "tmp" if "tmp" raster map exists:
g.mlist -r pattern='^tmp$'

Print out "tmp0" ..."tmp9" if corresponding vector map exists (each map name linewise):
g.mlist -r type=vect pattern='^tmp[0-9]$'

Print out "tmp0" ..."tmp9" if corresponding vector map exists (each map name comma separated):
g.mlist -r type=vect sep=, pattern='^tmp[0-9]$'
This may be useful for other programs' parameter input (e.g. r.series).

SEE ALSO

g.list

AUTHOR

Huidae Cho

Last changed: $Date$


Help Index