[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: stata in batch mode
Chris Rohlfs <firstname.lastname@example.org> writes,
> i'm trying to run a stata *.do file in batch mode from a unix shell script.
> my problem is that the stata intro screen appears in my nohup.out file &
> freezes on a "--more--" cue before my program has a chance to run & execute
> the "set more off" line. does anybody know how to get around this feature?
I suspect -q is the option you are looking for.
$ stata -q
tells Stata to come up and suppress displaying the opening screen.
Stata for Unix has some other "batch" features worth knowing about. The
first is that, if the output is redirected in a way that Stata can detect,
Stata knows you are trying to do something "batchy" and so turns of --more--
$ stata -q < input.do > output.log 2>&1
Chris is obviously using Unix's -nohup-, which does redirection -- but it
does it in a way that Stata cannot detect, so rather than type
$ nohup stata -q < input.do &
I suggest Chris type
$ nohup stata -q < input.do > output.log 2>&1 &
Another useful batch feature is -b, where the b stands for batch. This is
what I use. When you type
$ stata -b do myfile
Stata automatically creates myfile.log for the output and routes the output
there. Chris could type
$ stata -b do myfile &
$ nohup stasta -b do myfile &
Anyway, for a complete list of Stata-for-Unix startup options, type
$ stata -h
-h tells Stata to show the help display for the stata invocation command
rather than launching itself.
* For searches and help try: