Terminal sometimes scrambles initial output I switched to iTerm 2 a while ago, but would like to fix this small problem that I have with OS X's built-in Terminal.

Terminal is supposed to look like this when it first opens on my machine:



However, I am frequently met with the following output:



And more infrequently (but still reproducible enough):



My .bash_profile file consists of a bunch of aliases and one defined function for calculating battery life from the shell. I am able to reproduce the issue with no .bash_profile at all. .bashrc is empty.

What is the cause of this issue, and how can I fix it?
I would like to answer my own question, even though it is not an "answer," per se.

After testing on several different machines, I am confident that this is a bug with Terminal (and perhaps other virtual terminals on other operating systems). I have tested this on the following machines that are owned by separate users:


MacBook Pro (2012, 13-inch) running 10.9.4
MacBook Air (2012) running 10.9.3
MacBook Pro (2012, 15-inch) running 10.9.4


If someone would like to add to my list, please try running Terminal and quitting it in succession until you see the timestamp located on the same line as the initial prompt.

A friend of mine claims to have seen this on Linux as well.