How to redirect stdout to an open terminal window?

You can do this just like this post.