[GRASS-user] Running batch files

John C. Tull john.tull at wildnevada.org
Sun Sep 21 10:50:16 EDT 2008


On Sep 20, 2008, at 1:25 PM, Kris Nackaerts wrote:

> Dear all,
>
> I'm new to GRASS and am interested in running analysis from the  
> command line. My idea is to make a batch script that creates for  
> example png files.
>
> I did search for documentation, but could not find the right  
> information to get me started. I created a .bat file (I'm working on  
> windows, with GRASS 6.3), in this file, I set a lot of variables  
> with 'set blabla=value'). Then, I try the following
>
> set GRASS_PNGFILE=d:\test.png
> g.gisenv set=DEBUG=3
> g.region rast=slope -p
> d.mon start = PNG
> d.rast slope
> d.mon stop PNG
>
> I used filemon to check what's going on, and it seems each command  
> is found, but nothing seems to happen. No DEBUG info, no single  
> command provides any feedback, no PNG is created. The GUI of GRASS  
> works OK.
>
> I guess it's something really stupid I'm overlooking...
>
> I try to use the Spearfish sample data.
>
> Can someone provide some hints?
>
> Kris

Kris,

I'll ask the overly obvious: Are you running the script from within a  
GRASS session?

John


More information about the grass-user mailing list