I get a bash syntax error message every time I open Terminal
Open the Terminal.app and type the following line at your prompt

sed -i '' 's/than/then/' .bash_profile


You do have a .bash_profile in your home directory.