[GRASS-user] Renaming many files with one command
Vincent Bain
bain at toraval.fr
Sat Mar 18 08:50:20 PDT 2017
Hi Rich,
my one-liner 2-cents solution :
for i in `g.list type=vector pattern=open_h_*`;do g.rename vect=$i,`echo
$i | sed s/open_h_/blocked_h_/g`;done
Hope this helps !
Vincent.
Le samedi 18 mars 2017 à 07:42 -0700, Rich Shepard a écrit :
> I inadvertently overwrote a set of 25 output maps and want to change their
> names using g.rename. The manual page shows that g.rename raster=from,to can
> be applied to map(s), but there's no example for multiple maps.
>
> In my situation I want to change the pattern 'open_h_*' to 'blocked_h_*'.
> I don't see a pattern= option for g.rename or g.copy.
>
> TIA,
>
> Rich
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-user
More information about the grass-user
mailing list