After some frustrating failed attempts to do some simple raster calculations in GRASS (version 7.0), I found out there is a small change in the syntax for r.mapcalc in GRASS GIS 7:
The old syntax would look something like:
In GRASS GIS 7 you need to add spaces around the equal sign:
r.mapcalc "newmap = oldmap*2"
The good thing is that the new syntax is backwards compatible, you can use it in GRASS 6.x too.
There is however one other important change. In the old syntax, r.mapcalc would overwrite existing maps without warning. In the new syntax, you need to explicitly indicate that existing maps should be overwritten, using the –overwrite flag.
There is also the option to specify a file containing r.mapcalc expressions, check the manual for more details
r.mapcalc "outmap = inmap" # works with both 6.x and 7.0 r.mapcalc expr="outmap = inmap" # won't work with 6.x r.mapcalc "outmap=inmap" # won't work with 7.0 r.mapcalc outmap = inmap # won't work with 7.0