Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

Re: st: Execute a unix command within stata


From   Federico Belotti <f.belotti@gmail.com>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   Re: st: Execute a unix command within stata
Date   Fri, 10 May 2013 21:15:51 +0200

you can use the command -shell-. See help shell for detail.

hth
Federico

Il giorno 10/mag/2013, alle ore 21:07, Brian Wolfe <wolfeba@indiana.edu> ha scritto:

> Is it possible to execute a unix command within stata?  I often flip between stata and sas depending on the project and it would be helpful to be able to execute a sas file from stata.  Usually I'm running stata in batch mode on unix so I'd like to be able to execute a unix command within a do file.  For example when I'm using sas, I can use the command below to execute a stata do file
> 
> x 'stata -b do statacommands.do'
> 
> Is there an analogous command in stata that would let me run a unix command in the middle of a do file?
> 
> Thanks,
> 
> Brian
> 
> Brian Wolfe
> Indiana University
> Kelley School of Business
> PhD student - Finance
> http://ssrn.com/author=1472451
> wolfeba@indiana.edu
> 
> 
> 
> 
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/statalist-faq/
> *   http://www.ats.ucla.edu/stat/stata/

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


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index