[GRASSLIST:3418] Re: GRASS scripting question
Thomas.Adams at noaa.gov
Sat May 15 15:24:28 EDT 2004
I **JUST** realized before your reply that I did not use Perl's 'chomp'
command to strip of the newline character from the list of filenames I
read in. Just a stupid oversight on my part.
Thanks for you reply, Paul.
Paul Kelly wrote:
> 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.
> $cmd = "r.mapcalc \"". $newmap . "=". $map1 ."+". $map2 . "\"";
> not work?
Thomas E Adams
National Weather Service
Ohio River Forecast Center
1901 South State Route 134
Wilmington, OH 45177
EMAIL: thomas.adams at noaa.gov
More information about the grass-user