[GRASSLIST:6407] Batch exporting raster files

Is there any easy way to batch export GRASS rasters via GDAL to some output
format/extension? I have about 40 files to export and was hoping to avoid
doing them one at a time...

--j

--
Jonathan A. Greenberg, PhD
NRC Research Associate
NASA Ames Research Center
MS 242-4
Moffett Field, CA 94035-1000
650-604-5896
AIM: jgrn307
MSN: jgrn307@hotmail.com

Is there any easy way to batch export GRASS rasters via GDAL to some
output format/extension? I have about 40 files to export and was
hoping to avoid doing them one at a time...

Just write a small bash script:

for map in `g.mlist type=rast pattern='*'` ; do
   echo "Map is: $map"
   r.info -r $map
done

but replace r.info with whatever output command you want to use for the
export, e.g. d.rast + d.out.png or r.out.gdal

If you just want to do a slideshow, use d.slide.show.

Hamish