Переглянути джерело

g.remove: Add more examples in the manual; Clarify the description of pattern=

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@62087 15284696-431f-4ddb-bdfa-cd5b030d7da7
Huidae Cho 10 роки тому
батько
коміт
8c7b1e7c9e
2 змінених файлів з 17 додано та 16 видалено
  1. 16 15
      general/g.remove/g.remove.html
  2. 1 1
      general/g.remove/main.c

+ 16 - 15
general/g.remove/g.remove.html

@@ -1,33 +1,34 @@
 <h2>DESCRIPTION</h2>
 
 <em>g.remove</em> removes data files matching a pattern given by wildcards or
-POSIX Extended Regular Expressions. If the <b>-f</b> force flag is not given
-then nothing is removed, instead the list of selected file names is printed to
-<tt>stdout</tt> as a preview of the files to be deleted.
+POSIX Extended Regular Expressions. The <b>pattern</b> option can also take a
+list of map names separated by a comma. If the <b>-f</b> force flag is not
+given then nothing is removed, instead the list of selected file names is
+printed to <tt>stdout</tt> as a preview of the files to be deleted.
 
 <h2>EXAMPLES</h2>
 
-Delete all raster maps starting with "<tt>tmp_</tt>" in the current mapset:
+Delete <tt>map1</tt> and <tt>map2</tt> raster maps in the current mapset:
+<div class="code"><pre>
+g.remove -f type=rast pattern=tmp1,tmp2
+</pre></div>
 
+Delete all raster and vector maps starting with "<tt>tmp_</tt>" in the current
+mapset:
 <div class="code"><pre>
-# show matching raster maps but do not delete yet (as verification)
-g.remove type=rast pattern="tmp_*"
+# show matching raster and vector maps but do not delete yet (as verification)
+g.remove type=rast,vect pattern="tmp_*"
 
-# actually delete the matching raster maps
-g.remove -f type=rast pattern="tmp_*"
+# actually delete the matching raster and vector maps
+g.remove -f type=rast,vect pattern="tmp_*"
 </pre></div>
 
-Delete all raster maps starting with "<tt>stream_</tt>" in the current mapset,
+Delete all vector maps starting with "<tt>stream_</tt>" in the current mapset,
 but exclude those ending with "<tt>_final</tt>":
 <div class="code"><pre>
-g.remove -f type=rast pattern="stream_*" exclude="*_final"
+g.remove -f type=vect pattern="stream_*" exclude="*_final"
 </pre></div>
 
-<h2>SEE ALSO</h2>
-
-<em>
-</em>
-
 <h2>AUTHOR</h2>
 
 Huidae Cho<br>

+ 1 - 1
general/g.remove/main.c

@@ -78,7 +78,7 @@ int main(int argc, char *argv[])
     opt.pattern->key = "pattern";
     opt.pattern->type = TYPE_STRING;
     opt.pattern->required = YES;
-    opt.pattern->description = _("Map name search pattern");
+    opt.pattern->description = _("Map name search pattern or map names separated by a comma");
     opt.pattern->guisection = _("Pattern");
 
     opt.exclude = G_define_option();