I tried with what you proposed. It work fine. I just did an error with the ' quote.
Thanks Lucien ________________________________________ De : Moritz Lennert [[email protected]] Envoyé : mardi 17 septembre 2013 16:50 À : BLANDENIER Lucien Cc : [email protected] Objet : Re: [GRASS-user] Bash loop for mapcalc scripts On 17/09/13 16:26, BLANDENIER Lucien wrote: > Hello, > > I have some problem with the use of bash scripts for the r.mapcalc > function. For bash loop operation, I use the fprint function in order > allow GRASS to read each steps of the loop but this doesn't work with > r.mapcalc. Could you be more precise about what doesn't work ? > > Did someone alredy do some loops for the r.mapcalcs function with > bash scripts in GRASS? I've often used for loops with r.mapcalc operations, but never using printf. Why not call r.mapcalc directly, i.e. #!/bin/bash for i in $(seq 1 1 100) do r.mapcalc "new_rast = rast${i}@mapset*100" done ? Moritz _______________________________________________ grass-user mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/grass-user
