[GRASS-dev] [GRASS GIS] #3627: i.group: file= parameter for input desired

#3627: i.group: file= parameter for input desired
-------------------------+-------------------------
Reporter: neteler | Owner: grass-dev@…
     Type: enhancement | Status: new
Priority: normal | Milestone: 7.6.0
Component: Imagery | Version: 7.4.0
Keywords: i.group | CPU: Unspecified
Platform: All |
-------------------------+-------------------------
To enter the input to i.group can reach a significant number of map names.

On Unix like systems backticks can be used to feed in g.list output with
regex/wildcard search. However, this fails on Windows. Here the file
parameter would be handy:

{{{
# r.series example, also works on Windows as no backticks involved
g.list rast pattern="tmean.1981_2010.*.avg"
output=list_tmean_1981_2010.csv
r.series file=list_tmean_1981_2010.csv ...
}}}

Wish: add a "file" parameter to i.group is it exists for r.series and
other commands.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3627&gt;
GRASS GIS <https://grass.osgeo.org>

#3627: i.group: file= parameter for input desired
--------------------------+-------------------------
  Reporter: neteler | Owner: grass-dev@…
      Type: enhancement | Status: new
  Priority: normal | Milestone: 7.6.0
Component: Imagery | Version: 7.4.0
Resolution: | Keywords: i.group
       CPU: Unspecified | Platform: All
--------------------------+-------------------------

Comment (by mmetz):

Please try trunk r73147

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3627#comment:1&gt;
GRASS GIS <https://grass.osgeo.org>

#3627: i.group: file= parameter for input desired
--------------------------+-------------------------
  Reporter: neteler | Owner: grass-dev@…
      Type: enhancement | Status: new
  Priority: normal | Milestone: 7.6.0
Component: Imagery | Version: 7.4.0
Resolution: | Keywords: i.group
       CPU: Unspecified | Platform: All
--------------------------+-------------------------

Comment (by neteler):

Replying to [comment:1 mmetz]:
> Please try trunk r73147

Works like a charm, thanks! I'd be happy to see that backported since 7.4
will be used by many (Windows) users for a while...

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3627#comment:2&gt;
GRASS GIS <https://grass.osgeo.org>

#3627: i.group: file= parameter for input desired
--------------------------+-------------------------
  Reporter: neteler | Owner: grass-dev@…
      Type: enhancement | Status: new
  Priority: normal | Milestone: 7.6.0
Component: Imagery | Version: 7.4.0
Resolution: | Keywords: i.group
       CPU: Unspecified | Platform: All
--------------------------+-------------------------

Comment (by hellik):

Replying to [ticket:3627 neteler]:
> To enter the input to i.group can reach a significant number of map
names.
>
> On Unix like systems backticks can be used to feed in g.list output with
regex/wildcard search. However, this fails on Windows. Here the file
parameter would be handy:
>
> {{{
> # r.series example, also works on Windows as no backticks involved
> g.list rast pattern="tmean.1981_2010.*.avg"
output=list_tmean_1981_2010.csv
> r.series file=list_tmean_1981_2010.csv ...
> }}}
>
> Wish: add a "file" parameter to i.group is it exists for r.series and
other commands.

for the record, see https://lists.osgeo.org/pipermail/grass-
user/2018-June/078526.html

{{{
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@user1
raster/d172@user1
raster/it172@user1
raster/r172@user1
WARNING: Nothing removed. You must use the force flag (-f) to actually
          remove them. Exiting.
}}}

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3627#comment:3&gt;
GRASS GIS <https://grass.osgeo.org>

#3627: i.group: file= parameter for input desired
--------------------------+-------------------------
  Reporter: neteler | Owner: grass-dev@…
      Type: enhancement | Status: new
  Priority: normal | Milestone: 7.6.0
Component: Imagery | Version: 7.4.0
Resolution: | Keywords: i.group
       CPU: Unspecified | Platform: All
--------------------------+-------------------------

Comment (by mmetz):

Replying to [comment:2 neteler]:
> Replying to [comment:1 mmetz]:
> > Please try trunk r73147
>
> Works like a charm, thanks! I'd be happy to see that backported since
7.4 will be used by many (Windows) users for a while...

This enhancement is mainly targeting Windows users, and Windows users are
welcome to get the latest daily build from
https://grass.osgeo.org/download/software/ms-windows/

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3627#comment:4&gt;
GRASS GIS <https://grass.osgeo.org>

#3627: i.group: file= parameter for input desired
--------------------------+-------------------------
  Reporter: neteler | Owner: grass-dev@…
      Type: enhancement | Status: new
  Priority: normal | Milestone: 7.6.0
Component: Imagery | Version: 7.4.0
Resolution: | Keywords: i.group
       CPU: Unspecified | Platform: All
--------------------------+-------------------------

Comment (by neteler):

Replying to [comment:4 mmetz]:
> This enhancement is mainly targeting Windows users, and Windows users
are welcome to get the latest daily build from
https://grass.osgeo.org/download/software/ms-windows/

This does not work in production... ok time to release 7.6.0 then

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3627#comment:5&gt;
GRASS GIS <https://grass.osgeo.org>