[GRASS-dev] [GRASS GIS] #2228: g.mremove: add an option to use 'map name exclusion patterns' like is available in g.mlist

GRASS GIS trac at osgeo.org
Fri May 30 12:14:06 PDT 2014


#2228: g.mremove: add an option to use 'map name exclusion patterns' like is
available in g.mlist
-------------------------+--------------------------------------------------
 Reporter:  pvanbosgeo   |       Owner:  grass-dev@…              
     Type:  enhancement  |      Status:  new                      
 Priority:  normal       |   Milestone:  7.0.0                    
Component:  Default      |     Version:  unspecified              
 Keywords:               |    Platform:  All                      
      Cpu:  Unspecified  |  
-------------------------+--------------------------------------------------

Comment(by wenzeslaus):

 Replying to [comment:2 hcho]:
 > The attached g.mremove version addresses this issue and has the same
 interface as g.mlist (including exclude=, but except for mapset=,
 separator=, and output=, which are irrelevant). Please test it. I think we
 should push this version to trunk and possibly relbr7.
 >
 > The attached version works like:
 {{{
 g.mremove type=rast pattern="{sanderson,brady}_*"
 exclude="*_f{acc,dem},sanderson_fdir"

 g.mremove type=rast,vect pattern="brady_basin"
 }}}

 Is multiple map input still supported? I'm not sure how to remove multiple
 maps if I know their names considering that this version of `g.mremove` is
 used and `g.remove` will be removed. Now I do:

 {{{
 g.remove rast="mapone,maptwo,mapthree,mapfour,...,mapfifty"
 }}}

 The use case is a clean up function called at the end of the script which
 creates temporary maps.

 Perhaps send also a diff for convenience of other who want to check your
 suggestion quickly.

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/2228#comment:3>
GRASS GIS <http://grass.osgeo.org>



More information about the grass-dev mailing list