[GRASSLIST:1389] r.mapcalc

Horacio hsamanie at bio.puc.cl
Tue Jan 23 10:32:30 EST 2001


Hi, 
I'm trying to embed r.mapcalc command in a bash script... I'm having
troubles understanding how r.mapcalc handles variables...

for example in a for loop:

r.mapcalc final_$sp_name = $sp_name && (dem <= $((max_$sp_name)) && (dem
>= $((min_$sp_name))


I understand that some characters can cause troubles in the shell
interpretation for wich I should use something like...


r.mapcalc final_$sp_name \= $sp_name \&\& \(dem \<\= $((max_$sp_name))
\&\& \(dem \>\= $((min_$sp_name))\)


but it still doesn't work... 

How does grass handles variables in r.mapcalc???


I'll appreciate any hint on this...


thanks



-- 
Horacio Samaniego
Dep. Ecologia
P. Universidad Catolica
Alameda 340
Santiago, Chile

Fono:  (56 2)686 2950
Fax:   (56 2)686 2621
Email: hsamanie at bio.puc.cl

(http://akodon.bio.puc.cl/horacio)




More information about the grass-user mailing list