I am attempting to run a GRASS command from the terminal and eventually a bash script, in which it links rasters in a folder to the Mapset previously defined. I was able to successfully create the Mapset running a single line of code, however I receive the following error when I link the rasters:

ERROR: Flag -e required also flag -c Exiting...

It is to my understanding that I can run this code without having to create a new Mapset for each raster (reason for omitting -c flag), and can also run this without initializing GRASS 7.0 text (reason for including the -e flag).

My line of code that prompted the error is as follows: grass70 /path/to/grassdata/urma_latest/PERMANENT/ -e --exec r.external input=urma_2018050900.tif output=urma1

My goal is to run this for a series of rasters housed in the folder /path/to/rasters/

  • If I'm not mistaken, the --exec option was added only since version 7.2. It seems you are running 7.0 – Micha May 14 '18 at 9:32
  • Remove the -e flag. What happens? It should exit after an --exec call so you don't need the -e option. – mankoff May 16 '18 at 0:24
  • Please consider to upgrade - even grass74 (grass70 is very old and we improved a lot the --exec job support). – markusN May 18 '18 at 15:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.