Hi Michael, I tried to modify g.list. Instead of G_list_element(), the patch call G_list() and G_ls_format() .
Patch attached (not committed to CVS).
E.g.
$ g.list rast
----------------------------------------------
raster files available in mapset <martin>:
asp
----------------------------------------------
raster files available in mapset <PERMANENT>:
aspect elevation.dem fields landuse roads
soil.br.depth soils.ph strm.dist trn.sites
bugsites elevation.dted geology owner
rstrct.areas soils soils.range texture uparea
density erode.index landcover.30m quads
rushmore soils.Kfactor spot.image tractids
vegcover
elevation.10m erosion1 landcover.orig railroads slope
soils.Tfactor streams transport.misc
$ g.list rast --q
asp
aspect
bugsites
density
elevation.10m
elevation.dem
elevation.dted
erode.index
erosion1
fields
geology
landcover.30m
landcover.orig
landuse
owner
quads
railroads
roads
rstrct.areas
rushmore
slope
soil.br.depth
soils
soils.Kfactor
soils.Tfactor
soils.ph
soils.range
spot.image
streams
strm.dist
texture
tractids
transport.misc
trn.sites
uparea
vegcover
Martin
2007/9/3, Michael Barton <[EMAIL PROTECTED]>:
>
> Awhile ago, I think g.mlist output was changed so that it sent out a single
> list of maps or other GIS elements rather than a multicolumn list. Is there
> a way to add a flag to g.list so that it can produce output in the same way?
>
> As it is, the output of g.list cannot easily be parsed within a script
> because of it's multicolumn output. If the output could be a nice, clean
> single list, it *would* be parsable. Within a script, g.list is preferable
> over g.mlist for finding all relevant files in a mapset because it seems
> considerably faster.
>
> Michael
> __________________________________________
> Michael Barton, Professor of Anthropology
> Director of Graduate Studies
> School of Human Evolution & Social Change
> Center for Social Dynamics & Complexity
> Arizona State University
>
> phone: 480-965-6213
> fax: 480-965-7671
> www: http://www.public.asu.edu/~cmbarton
>
>
> _______________________________________________
> grass-dev mailing list
> [email protected]
> http://grass.itc.it/mailman/listinfo/grass-dev
>
--
Martin Landa <[EMAIL PROTECTED]> * http://gama.fsv.cvut.cz/~landa *
g-list-vq.diff.gz
Description: GNU Zip compressed data
_______________________________________________ grass-dev mailing list [email protected] http://grass.itc.it/mailman/listinfo/grass-dev

