Moritz Lennert wrote: > > We received an error with the following simple mapcalc statements > > > > r.mapcalc 'frict=1' > > r.mapcalc 'test=pendiente*2' > > > > It turns out that you cannot use single quotes in this context. You need to > > use regular quotes. So the way to specify the same mapcalc statements from > > the GUI command console is... > > > > r.mapcalc "frict=1" > > r.mapcalc "test=pendiente*2" > > > > I thought we had tried double quotes too, but maybe we didn't. I'll wait for > > Javi to check email and test. The worrisome thing is that we initially used > > the GUI map calculator from the menu and got an error. I tried it this > > morning on my Mac and did not get an error. > > In windows you don't need any quotation marks, so > > r.mapcalc frict=1 also works, as does r.mapcalc x=frict/3. > > The only issue might be special characters which you would have to > escape somehow.
Those examples will work without quotes on any platform. Also, the expression can be split over multiple arguments; r.mapcalc just concatenates its arguments with spaces between them. You only need quotes if there are any shell metacharacters; Bourne shells have more of those than cmd.exe, so it's more of an issue for Unix. I don't recall whether cmd.exe expands * and ?, or whether that's up to the individual program. -- Glynn Clements <[EMAIL PROTECTED]> _______________________________________________ grass-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/grass-dev
