Dear,

This is a quite confusing discussion for a newcomer. People talk about a 'shell' and batch commands which seems to have different meanings.

I do like/prefer the Python approach. But again here, I found out there seems to be Python scripts for GRASS that have to be run from within 'the GRASS environment'?

Kris

Marco Pasetti wrote:
Hi Moritz,


sorry, I'm probably missing the point... but I'll try to help:

Note that IIRC, the automatic GUI creation for commands without parameters does not work in Windows (Marco, can you confirm ?). So just calling 'g.region' will probably not work. Try with 'g.region -p'

if you mean: type a command directly in the shell, that is: not in the GRASS Output GUI command line, but from the shell (cmd or msys) that started GRASS (calling the grass63 command)

YES, you're definetely right!

then, about creating batch processes for GRASS commands, I suggest to create scripts with a Unix-like syntax and then launch them within a GRASS MSYS session:

1. open the GRASS MSYS console: http://grass.osgeo.org/grass63/binary/mswindows/native/README.html#Launching%20GRASS

2. if you're not sure how to use Unix-like commands, you can basically refer to this document: http://en.wikipedia.org/wiki/List_of_Unix_utilities

note: not all the commands listed in the document above are recognized by MSYS. To know if a specif_command is known by the system in use, type
which specif_command
and enter

3. write your batch commands with a simple text editor and then save it as "filename.sh" in \GRASS\msys\home\username\ or in \GRASS\scripts\

4. launch GRASS from the MSYS console, and then type "filename.sh" in the msys command line

Regards,

Marco


_______________________________________________
grass-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-user

Reply via email to