Statalist


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

st: re: execute external program from within Stata?


From   Kit Baum <[email protected]>
To   [email protected]
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
 4
 5
 6
 7
 8
 9
 10


Kit Baum, Boston College Economics and DIW Berlin
http://ideas.repec.org/e/pba1.html
An Introduction to Modern Econometrics Using Stata:
http://www.stata-press.com/books/imeus.html


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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