Statalist The Stata Listserver

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

Re: st: Making an 'output only' logfile.

From   Joseph Coveney <[email protected]>
To   Statalist <[email protected]>
Subject   Re: st: Making an 'output only' logfile.
Date   Mon, 18 Sep 2006 19:41:10 +0900

Kelvin Foo wrote:

I have a do file which contains many commands such as -generate-,
-regress-, -nlcom-, etc..
I would like to run this file, and keep a log of just the output and
not the commands. How can this be done?


This comes up periodically, so you might want to check the archives for any
better suggestions (there might even be an FAQ by now), but I use
a simple -program- wrapper.

Joseph Coveney

. program define logem
 1. version 9.2
 2. capture log close
 3. quietly log using log.prn, text
 4. sysuse auto
 5. regress price weight
 6. display in smcl _newline(2)
 7. nl (price = {constant} + {weight} * weight)
 8. display
 9. quietly log close
10. end

. logem
[output snipped--it contains no commands]

. viewsource log.prn


*   For searches and help try:

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