[GRASSLIST:3417] Re: GRASS scripting question

Paul Kelly paul-grass at stjohnspoint.co.uk
Sat May 15 15:19:39 EDT 2004


On Sat, 15 May 2004, Thomas Adams wrote:

The usual way around this is just to quote the expression, e.g.

r.mapcalc "expression"

> saying that "+map2" is an invalid command, but the "r.mapcalc 
> ".$newmap."=".$map1 part suceeds. I have also tried using:
>
> $cmd = "r.mapcalc ". $newmap . "=". $map1 ."\+". $map2; 
> When I try using Perl's 'join' command I get the same error.

Does

$cmd = "r.mapcalc \"". $newmap . "=". $map1 ."+". $map2 . "\"";

not work?




More information about the grass-user mailing list