[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: re: execute external program from within Stata?

From   Kit Baum <>
Subject   st: re: execute external program from within Stata?
Date   Tue, 18 Nov 2008 21:17:05 -0500

Sergiy writes

Just curious, which other (than Windows) platforms that Stata runs on,
have their executable files stored with extension .exe?

None. That file extension is a DOSism. In *nix, an executable is just a name. *nix commands are executable files:

bcvpn96:code baum$ ls -l /bin/ls
-r-xr-xr-x  1 root  wheel  73696 Apr 20  2008 /bin/ls

The -ls- command on a *nix system (in this case Mac OS X) is the equivalent of -dir- in DOS. It is an executable file called ls. Not ls.exe, ls.bin, etc. -- just ls.

So if I have a Fortran95 program test.f, I give the command

ecstata:~ baum$ g95 -o test test.f

and I end up with an executable named test:

ecstata:~ baum$ ls -l test
-rwxr-xr-x  1 baum  staff  341012 Nov 18 21:14 test

which can be run by mentioning its name:

ecstata:~ baum$ ./test

Kit Baum, Boston College Economics and DIW Berlin
An Introduction to Modern Econometrics Using Stata:

*   For searches and help try:

© Copyright 1996–2022 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index