Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: Advanced use of the shell command


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   RE: st: Advanced use of the shell command
Date   Thu, 26 Jun 2008 17:59:22 +0200

I do not want to hijack this interesting thread but is there a way to tell
-shellout- not to open a new instance of the program it calls? -shellout
using foo.tex- brings up a new instance of my editor which clutters my
session with a lot o f redundant programs...

Martin Weiss
_________________________________________________________________

Diplom-Kaufmann Martin Weiss
Mohlstrasse 36
Room 415
72074 Tuebingen
Germany

Fon: 0049-7071-2978184

Home: http://www.wiwi.uni-tuebingen.de/cms/index.php?id=1130

Publications: http://www.wiwi.uni-tuebingen.de/cms/index.php?id=1131

SSRN: http://papers.ssrn.com/sol3/cf_dev/AbsByAuth.cfm?per_id=669945


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Sergiy Radyakin
Sent: Thursday, June 26, 2008 5:24 PM
To: [email protected]
Subject: Re: st: Advanced use of the shell command

Hello Roy,

thank you for your interest. However, shellout uses winexec, and hence
does not wait for the program that has been launched to complete. The
OS (command processor) does wait, but this happens in parallel to the
Stata process, which continues executing the do file. An old trick to
organize a wait is to wait for a marker file to be created, but this
may never happen if the process being launched crashes. (I may not
know in advance, how much time it will need for FooBar.exe to
complete, hence timeouts are not applicable).

I also don't see how the "<" can make a difference. Try:
dir
dir /s
dir /s < nul

Using "<" with a parameters file does not replace the parameters
already present in the command line. hence the last two commands will
produce the same output, even though it is (generally) different from
the output of the first command. So I can't remove /C which is added
by Stata in the command line, unless I can change the code of
FooBar.exe to skip the first parameter.

But, just out of curiosity, what is a "Windows clone running on Linux"?


Thank you,
   Sergiy Radyakin



On 6/26/08, Roy Wada <[email protected]> wrote:
>
> >I have three questions regarding the use of the shell command in Stata
> >for Windows. This is rather technical, and might be interested to just
> >a few readers, but I would really want to know the answers.
>
> -shellout- might take you halfway there. The codes are posted here:
>
> http://datasets.org/statalist/archive/2007-11/msg00923.html
> http://datasets.org/statalist/archive/2007-11/msg00990.html
>
> Note that "<" is a way to upload predefined parameters from a text file.
>
> Someone told me it doesn't work on a Windows clone running on Linux.
> It works fine on my Windows XP machine.
>
> The latest version on SSC (bundled under -outreg2-) comes with a
> help file.
>
> Roy
>
> _________________________________________________________________
> Need to know now? Get instant answers with Windows Live Messenger.
>
http://www.windowslive.com/messenger/connect_your_way.html?ocid=TXT_TAGLM_WL
_Refresh_messenger_062008
> *
> *   For searches and help try:
> *   http://www.stata.com/support/faqs/res/findit.html
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
>
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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