In the Geopackage below (in.gpkg) I would like to extract the first layer (i.e. pinios_eudem2_basins) and write it to a new Geopackage (out.gpkg). However I would like to do this not by name, but with the help of a wildcard or an index. Is this possible?
This works, but I don't need it.
ogr2ogr -f "GPKG" -overwrite out.gpkg in.gpkg pinios_eudem2_basins
I would like to have something like this..
ogr2ogr -f "GPKG" -overwrite out.gpkg in.gpkg *_eudem2_basins ogr2ogr -f "GPKG" -overwrite out.gpkg in.gpkg $1
INFO: Open of `in.gpkg' using driver `GPKG' successful. 1: pinios_eudem2_basins (Multi Polygon) 2: pinios_eudem2_basins_h1 (Multi Polygon) 3: pinios_eudem2_basins_h2 (Multi Polygon) 4: pinios_eudem2_basins_h3 (Multi Polygon) 5: pinios_eudem2_basins_h4 (Multi Polygon) 6: pinios_eudem2_basins_h5 (Multi Polygon) 7: pinios_eudem2_basins_h6 (Multi Polygon) 8: pinios_eudem2_basins_h7 (Multi Polygon)