[GRASS-user] batch export

Glynn Clements glynn at gclements.plus.com
Tue Aug 26 13:47:46 EDT 2008

Martin Wegmann wrote:

> When I do:
> for rast in "`g.mlist pattern'*.asc' sep=" "`"; do
> echo "$rast.test"; done
> I get:
> name1.asc name2.asc name3.asc.test
> but I need:
> name1.asc.test name2.asc.test name3.asc.test
> any idea how to achieve that?

Don't put double quotes around lists (e.g. the result of the g.mlist
command within the backticks above).

If you do:

	for rast in "..."; do

you will only get one iteration, regardless of what's inside the
quotes, as a quoted string is a single "word".

Glynn Clements <glynn at gclements.plus.com>

More information about the grass-user mailing list