[GRASS-translations] r.mapcalc
Glynn Clements
glynn at gclements.plus.com
Mon Apr 26 12:48:18 EDT 2010
Marco Curreli wrote:
> I'm translating the r.mapcalc manpage in italian, and I'm a bit confused
> about "standard input" and "command line"
>
> In the paragraph NOTES
>
> For formulas that the user enters from standard input
> (rather than from the command line), a line continuation feature now exists.
> If the user adds \e to the end of an input line, <em>r.mapcalc</em> assumes that
> the formula being entered by the user continues on to the next input line.
The reference to "\e" is incorrect; a continuation is indicated by a
backslash at the end of a line (trailing whitespace is ignored). I'm
not sure how the "e" got in there.
> I'm wondering why "rather than from the command line"; to enter from
> standard input isn't the same than to enter from command line?
"command line" means that the expression is passed as an argument, e.g.:
$ r.mapcalc 'outmap = something(inmap)'
"standard input" means that r.mapcalc reads the expression from its
standard input, whatever that happens to be associated with, e.g.:
$ r.mapcalc
'outmap = something(inmap)'
end
or:
$ echo 'outmap = something(inmap)' | r.mapcalc
or:
$ r.mapcalc < cmdfile
or (in a script):
r.mapcalc <<EOF
outmap = something(inmap)
EOF
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-translations
mailing list