[GRASS-user] skripting with xargs: bug or feature ?
Glynn Clements
glynn at gclements.plus.com
Wed Jun 4 13:17:57 EDT 2008
peter.loewe at gmx.de wrote:
> I just stumbled over this one:
>
> For some reason, xargs can't be used when LOTS of filenames have to be concatenated in a GRASS script.
>
> The example attempts to collect all raster layers with a 6-character name to stack them into
> a volume.
>
> g.mlist type=rast pattern='??????' sep=, |xargs r.to.rast3 input={} output=The_volume
You need to pass -i or -I'{}' to xargs to have the input substituted
in place of the {}. Otherwise, it will just be appended.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-user
mailing list