[GRASS-dev] g.mremove bug?
Moritz Lennert
mlennert at club.worldonline.be
Thu Feb 21 07:03:11 EST 2008
On 21/02/08 12:05, Martin Wegmann wrote:
> Hello,
>
> to validate a modelling module I generated output raster (ca. 10000 - but I
> did not want to look at each of them ,-) )
>
> but when I try to remove them using g.mremove I get:
>
> g.mremove rast=out_ST* -f
> Collecting map names for current mapset <nlm>...
> Forcing ...
> /usr/local/grass-6.3.svn/scripts/g.mremove: line
> 218: /usr/local/grass-6.3.svn/bin/g.remove: Lists of arguments is too long
> /usr/local/grass-6.3.svn/scripts/g.mremove: line
> 218: /usr/local/grass-6.3.svn/bin/g.remove: success
The shell has a maximum line length (and maximum argument number ?)
which you probably exceed with this list.
You'd probably be better off doing something like this:
for map in `g.mlist rast pattern="out_ST*"`
do
g.remove $map
done
Moritz
More information about the grass-dev
mailing list