[Gretl-devel] Ignacio's tramo script

Allin Cottrell cottrell at wfu.edu
Fri Jan 26 14:29:30 EST 2007


On Thu, 25 Jan 2007, Ignacio Díaz-Emparanza wrote:

> The week before, the command
>
> ! cmd /c "..."
>
> was working but not now.

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.


More information about the Gretl-devel mailing list