Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • ADO output

    Is there a way to run an ADO without printing the commands being run (only their output)?

    i.e.
    Code:
    [...]
    . qui sum timer, d <- don't show this
    <- don't show this empty line (if possible)
    . di "median: `r(p50)' seconds" <- don't show this
    median: 26.16600036621094 seconds <- show this
    [...]

  • #2
    ??? This is strange. .ado files automatically run showing only output without showing the commands. Normally in order to see the commands you have to -set trace on-. If you have done that and now want to turn it off, just run -set trace off-. If you didn't -set trace on- to cause this, I'm wondering what you did, because that is definitely not how ado files work normally.

    Comment


    • #3
      I'm sorry, you are right, I meant the following:

      Code:
      cat>test.do<<EOF
      di 1+1
      EOF
      stata -q test.do
      . do "test.do"
      
      . di 1+1
      2
      
      .
      end of do-file
      
      
      .
      Here I would like only "2" to be printed, or perhaps the minimum number of lines to be printed really, I don't need to see which command is run, I know what those are.

      Comment


      • #4
        Well, you could convert all of the contents of the .d file into a program, and then save it as an .ado file with the same name you gave the program. Then just invoke that name as a command and you will get outputs without the commands.

        Added: That said, it sounds like a bad idea. You may know what the commands are now, but will you remember them in 6 months?

        Comment

        Working...
        X