How do I fix a syntax error in .bash_profile
Edit the file with a GUI program e.g. TextEdit

Open TextEdit and select the home directory. .bash_profile is hidden so instead of a simple selection then you might have to hit CmdShift. to show .bash_profile When saving delete the .txt ending TextEdit adds or alter TextEdits's preferences.