[GRASS-user] skripting with xargs: bug or feature ?
peter.loewe at gmx.de
peter.loewe at gmx.de
Wed Jun 4 02:07:02 EDT 2008
Hi,
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
While the xargs-string is correctly built, r.to.rast3 prints an error message.
The old-fashioned approach works:
list=`g.mlist type=rast pattern='??????' sep=,`
foo="r.to.rast3 input=$list output=volume"
eval $foo
Comments, anyone ?
Peter
--
Dr. Peter Löwe
<peter.loewe at gmx.de>
Super-Aktion nur in der GMX Spieleflat: 10 Tage für 1 Euro.
Über 180 Spiele downloaden: http://flat.games.gmx.de
More information about the grass-user
mailing list