[GRASS-user] Bash loop for mapcalc scripts
BLANDENIER Lucien
lucien.blandenier at unine.ch
Wed Sep 18 11:37:56 PDT 2013
I tried with what you proposed. It work fine.
I just did an error with the ' quote.
Thanks
Lucien
________________________________________
De : Moritz Lennert [mlennert at club.worldonline.be]
Envoyé : mardi 17 septembre 2013 16:50
À : BLANDENIER Lucien
Cc : grass-user at lists.osgeo.org
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
More information about the grass-user
mailing list