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@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 <[email protected]> _______________________________________________ grass-user mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/grass-user
