Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am in a GRASS database (in command shell), where I want to run a loop function. For example, I want to do an operation on many raster files that are in the database. I know this must be done through a txt file. What i am confused about is where I should put this file, and how exactly I should call it.

I am also a bit confused if I should be writing a batch or a bash file. GRASS is UNIX based which makes me think I should be looking to bash, but I am in windows command shell, where batch scripting applies.

Thanks for your help!

share|improve this question
add comment

migrated from stackoverflow.com Sep 21 '12 at 16:29

This question came from our site for professional and enthusiast programmers.

1 Answer

A bash file (.sh) will work fine, the name and location are not really important. If you are using the graphical interface of GRASS, you can copy/paste your bash script in the scripting window and run it from there. See also this tutorial.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.