On Thu, Apr 25, 2013 at 6:27 PM, Micha Silver <[email protected]> wrote: > MAX=`r.univar -g map=<your raster> | grep max | cut -d '=' -f 2` > r.mapcalc "newrast = myrast*100/$MAX"
Even easier: GRASS 6.4.3svn (nc_spm_08):~ > eval `r.univar -g elevation` GRASS 6.4.3svn (nc_spm_08):~ > echo $max 156.329864501953 GRASS 6.4.3svn (nc_spm_08):~ > r.mapcalc "newrast = myrast * 100.0 / $max" Note that I wrote 100.0 for floating point arithmetics. If you really want r.info, then likewise with: GRASS 6.4.3svn (nc_spm_08):~ > eval `r.info -gr elevation` markusN _______________________________________________ grass-user mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/grass-user
