El Viernes, 26 de Enero de 2007 20:29, Allin Cottrell escribió:
I believe this is now fixed in the current Windows snapshot, but
it does involve some change in syntax for "!" on Windows. Here is
the deal:
* Gretl automatically waits for "!" commands to complete.
* The apparatus of "cmd /c" is implicit, you should not
prepend your command with that.
* The shell command as a whole should not be quoted, although
filenames with embedded spaces should be wrapped in quotes.
* There's a new "set" variable, "shelldir", which sets the
working directory for "!" commands (also on Linux).
Thus suppose from inside gretl you want to delete the files *.t in
directory c:\foo\bar. You could do
set shelldir c:\foo\bar
! del /Q *.t
Or (without shelldir)
! cd c:\foo\bar && del /Q *.t
To run tramo in c:\userdata\tramo:
set shelldir c:\userdata\tramo
! tramo -i baz -k serie
This is partly, not fully tested. I can't say for certain that
"shelldir" works on Windows, though it should.
Allin.
I have just tested all of this in my script, and all works ok!
Thank you Allin, I think it is a very important improvement of the
Gretl shell command.
I only wonder whether it is convenient that the option /c (in "cmd /c") be
always implicitly run, since in building my script I had to run it several
times with option /k to check the output of the commands executed in the
shell ...
An alternative is to use the "launch" command to debug, as I can see that it
does not include the "cmd /c" option by default.
--
Ignacio Díaz-Emparanza
Dpto. de Economía Aplicada III (Econometría y Estadística)
UPV-EHU