can't use terminal from error in .bash_profile
Open Terminal
, and go to File (or Shell) -> New Command
. Type in open -e .profile
(or substitute some other file instead of .profile
), and hit Run. That should open TextEdit with the file you want to fix; you can remove the offending lines there.
For completeness, here's another way: open TextEdit (or your favorite GUI text editor). In the open dialog, press Command-Shift-Period, and it'll display (and let you open) invisible files such as .profile. Remove the offending lines, save, and you should be good to go.