[GRASS-user] question on i.nightlights.intercalibration code

Helmut Kudrnovsky hellik at web.de
Sat Jun 23 00:14:25 PDT 2018


>Are you using Windows? I think you cannot use g.list inside a command as we
do in Linux

not as elegant in linux, but you can do something similar in windows too

e.g. in the winGRASS command line:

:\>FOR /F %c in ('g.list "type=raster" "pattern=*2" "mapset=user1"
"separator=comma"') DO SET RASTER2REMOVE=%c

C:\>SET RASTER2REMOVE=b172,d172,it172,r172

C:\>echo %RASTER2REMOVE%
b172,d172,it172,r172


C:\>g.remove type=raster name=%RASTER2REMOVE%
The following data base element files would be deleted:
raster/b172 at user1
raster/d172 at user1
raster/it172 at user1
raster/r172 at user1
WARNING: Nothing removed. You must use the force flag (-f) to actually
         remove them. Exiting.



-----
best regards
Helmut
--
Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Users-f3884509.html


More information about the grass-user mailing list