Similar to the question How to reset teminal under mac os x, I was wondering how to reset the scrollback buffer of a mac osx terminal window from a script.
I know I can hit Cmd-K to reset it manually, but I often forget to do this before running a script with a lot of output. It would be easier to remove the scrollback buffer at the beginning of my script. The "clear" command doesn't reset the scrollback buffer, so when I scroll up I still see the previous scripts output.
reset
.