[GRASS-user] Re: r.mapcalc --> 3 maps

Glynn Clements glynn at gclements.plus.com
Tue Jan 18 14:55:50 EST 2011

Gabriele N. wrote:

> Although the logic is different (in the solution of Maciek I do a check
> before the NULL value, while in the solution of Glynn I do a check before
> non-NULL values), I believe that the result is the same.
> One note: with the solution of Glynn (at least using the shell from QGIS) it
> works with single quotes ' and not with double quote " .
> gab at gab-laptop:~$ r.mapcalc "output_2 = if(!isnull(a),a,if(!isnull(b),b,c))"
> bash: !isnull: event not found

bash uses "!" for history expansion; single quotes disable all
expansions, while double quotes only prevent the string from being
split into words on whitespace. History expansion is only performed
for interactive shells, so it doesn't affect scripts or system().

Glynn Clements <glynn at gclements.plus.com>

More information about the grass-user mailing list