[GRASSLIST:791] Re: bash scripts don't wait for grass
Benjamin Ducke
benjamin.ducke at ufg.uni-kiel.de
Fri Apr 21 03:37:57 EDT 2006
Hmmm, I think there is one major problem with CygWin and
Unix scripting in general: CygWin really is Windows, thus
incapable of doing a few basic things that true Unix can.
One really sore spot is the fact that Windows cannot redirect
the stderr output. The CygWin console suffers from the same
defficiency. If you have a module that tries to redirect
its stderr to a file, e.g. for hiding status messages, you
will get a total mess!
I ran into the same problem a while ago and found no solution
other than this:
Disable all sorts of message hiding, quiet options etc. in
the modules causing problems and make them dump there full
verbose output to the console. This is the only place where
stderr does not make a mess in Windows.
This means that you will get a lot of unwanted status messages
on your console, but at least your processes will run in clean
order.
If anyone has a better solution for this, I would be very
interested to know, indeed!
Best,
Benjamin
Luigi Ponti wrote:
> Hello,
>
> Maybe unrelated but I remember a similar question on the list.
>
> When I run a ~400 lines bash script to batch process more than just a
> couple of files, the script kind of of gets tangled and stops before
> processing the last file (it is basically v.in.ascii importing plus
> v.rast.idw interpolating, and some Perl scripts), as if some overlapping
> between child processes occurred.
>
> I tried with the "wait" bash command which should have fixed it, but it
> still occurs. Is it a known issue? Or is it related to the fact that I
> am running grass60 on cygwin?
>
> Any hints to make grass batch processing more reliable will be appreciated.
>
> Thanks,
>
> Luigi
>
>
>
--
Benjamin Ducke, M.A.
Archäoinformatik
(Archaeo-Information Science)
Institut für Ur- und Frühgeschichte
(Institute of Archaeology)
Christian-Albrechts-Universität zu Kiel
Johanna-Mestorf-Straße 2-6
D 24098 Kiel
Germany
Tel.: ++49 (0)431 880-3378 / -3379
Fax : ++49 (0)431 880-7300
www.uni-kiel.de/ufg
More information about the grass-user
mailing list