Daniel Victoria wrote:

> To get around the ' or " problems when scripting for r.mapcalc I
> prefer to use another syntax construction that goes like this:
> 
> echo "river = if(river == $old, $new, null())" | r.mapcalc
> 
> That way you evaluate the variables $old and $new before sending it to
> r.mapcalc.

There is no advantage to using the above form. Even if you use:

        r.mapcalc "river = if(river == $old, $new, null())"

the variables are still expanded by the shell.

-- 
Glynn Clements <gl...@gclements.plus.com>
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Reply via email to