Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: Suppressing -log- in Linux batch mode
From
Michael Barker <[email protected]>
To
[email protected]
Subject
Re: st: Suppressing -log- in Linux batch mode
Date
Wed, 31 Jul 2013 10:03:54 -0400
You could try "run" instead of "do", like this:
nohup stata -b run mydofile &
This will not stop the log from being created, but the log will only
have the Stata start-up text. This is the same behavior you would get
with quietly{ }
If you don't want the log file to show up at all, you could delete it
from within the do-file. You could pass an option to the do-file so
you could control this behavior from the command line. Your do-file
would look like this:
--top of file--
args log
-- your do-file --
if "`log'"=="nolog" {
! rm mydofile.log
}
--end of file--
Then, in linux, use one of these batch mode commands:
# With log:
nohup stata -b do mydofile &
# No log:
nohup stata -b run mydofile nolog &
Mike
On Tue, Jul 30, 2013 at 5:36 PM, Ted Player <[email protected]> wrote:
> Hello everyone. I'm using the following to run a -do- file in batch
> mode on Linux:
>
> nohup stata -b do mydofile &
>
> That works fine except that I want to suppress the -log- file that
> Stata automatically creates (for reasons that are too lengthy to
> describe here). Does anyone know a command-line switch I could add to
> prevent the -log- file from being created?
>
> Let me mention that I realize I could edit the -do- file to insert
> "quietly {" or similar solutions, but I would like leave the -do- file
> unedited to retain the ability to create the -log- file sometimes. A
> switch to easily turn the -log- file on and off from the command line
> would be the perfect solution. Is there such a method?
>
> Thanks in advance!
>
> - Ted
> *
> * 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/