[GRASS-user] r.patch example in the manual

Hello List

I'm trying the r.patch example given in the manual for 6.3.0RC3 and there
appears to be a problem passing the output from g.mlist to g.region. So, in
fact, I haven't managed to try r.patch yet. I followed the example and this
is what I got back:

GRASS 6.3.0RC3 (msunduzi_lo31):~ > MAPS='g.mlist type=rast sep=,
pat="*.red"'
GRASS 6.3.0RC3 (msunduzi_lo31):~ > echo $MAPS
g.mlist type=rast sep=, pat="*.red"
GRASS 6.3.0RC3 (msunduzi_lo31):~ > g.region rast=$MAPS
Sorry, <type> is not a valid parameter
Sorry, <sep> is not a valid parameter
Sorry, <pat> is not a valid parameter

I guess I need to tell bash to evaluate MAPS rather than just expanding the
variable, but I am not sure how. Pointers are welcome...

Thanks

Craig.
--
View this message in context: http://www.nabble.com/r.patch-example-in-the-manual-tp14372554p14372554.html
Sent from the Grass - Users mailing list archive at Nabble.com.

Hi,

2007/12/17, Craig Leat <Craig@pid.co.za>:

I'm trying the r.patch example given in the manual for 6.3.0RC3 and there
appears to be a problem passing the output from g.mlist to g.region. So, in
fact, I haven't managed to try r.patch yet. I followed the example and this
is what I got back:

GRASS 6.3.0RC3 (msunduzi_lo31):~ > MAPS='g.mlist type=rast sep=,
pat="*.red"'

Instead of ' use ` ...

MAPS=`g.mlist type=rast sep=, pat="*.red"`

GRASS 6.3.0RC3 (msunduzi_lo31):~ > echo $MAPS
g.mlist type=rast sep=, pat="*.red"
GRASS 6.3.0RC3 (msunduzi_lo31):~ > g.region rast=$MAPS
Sorry, <type> is not a valid parameter
Sorry, <sep> is not a valid parameter
Sorry, <pat> is not a valid parameter

Martin

--
Martin Landa <landa.martin@gmail.com> * http://gama.fsv.cvut.cz/~landa *

Martin Landa-2 wrote:

2007/12/17, Craig Leat:

I'm trying the r.patch example given in the manual for 6.3.0RC3

Instead of ' use ` ...

MAPS=`g.mlist type=rast sep=, pat="*.red"`

Thanks Martin. Another question:

I notice the "pattern" option to g.mlist has been shortened to "pat" and the
"input" and "output" options to gdal sometimes get shortened to "in" and
"out". Is there a rule one can apply for shortening these options and do all
GRASS modules understand the short options?

Craig
--
View this message in context: http://www.nabble.com/Re%3A-r.patch-example-in-the-manual-tp14379012p14384495.html
Sent from the Grass - Users mailing list archive at Nabble.com.

Craig Leat wrote:

I notice the "pattern" option to g.mlist has been shortened to "pat"
and the "input" and "output" options to gdal sometimes get shortened
to "in" and "out". Is there a rule one can apply for shortening these
options and do all GRASS modules understand the short options?

Yes; added as new FAQ entry:
  http://grass.gdf-hannover.de/wiki/Module_command_line_parser

    * Option names may be shortened up to the point where they collide.
Thus shortening option names in a module with color= and column=
options would require at minimum colo= and colu=.

for example:
  input= -> in= and output= -> out=

Hamish

      ____________________________________________________________________________________
Looking for last minute shopping deals?
Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping