Hi,



I am trying to combine a commandline tool (MarZone) with GRASS in a shell 
script (MSYS in OSGeo4W or Ubuntu).

The MarZone command should run in a loop where it recives new input from GRASS 
in each iteration.

My scripts works in principle, however, unlike other command line tools, 
MarZone does not end when it is done, but  one has to press enter to stop.

It ends with "Press return to exit." on screen.

In order to handle this in a loop, I simply kill the process after the time I 
expect the sofware to run (plus a little time buffer):

Like this:

perl -e 'alarm shift @ARGV; exec @ARGV' 60 ./MarZone_x64.exe



Unfortunately, this is neither an effient nor a stable solution as the time the 
software runs can vary quite a bit, depending on some parameter settings.



My question is, is there a way to somehow catch, that the software is ready 
(when it prints "Press return to exit."), an kill it then?

Any idea?



Thanks for helping,

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

Reply via email to