I am on a MacBook Pro, running the latest version of Mountain Lion.
I really need some help, I have managed some how to damage my .bash_profile (I think) so that every time I open up the terminal I get the error listed below.
-bash: export: `/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/go/bin': not a valid identifier
-bash: export: `/Users/rob/Applications/sbt/bin:': not a valid identifier
env: bash: No such file or directory
env: bash: No such file or directory
env: bash: No such file or directory
env: bash: No such file or directory
env: bash: No such file or directory
-bash: tar: command not found
-bash: grep: command not found
-bash: cat: command not found
-bash: find: command not found
I am not sure what has happened, I have no sudo, cd or any normal commands. The only way I have been able to get to any of the main directories is through the go to folder command in finder and try to find the file to no avail.
To top it all off I think I created a file that might be causing the issue, I wanted to edit the .bash_profile so I typed
sudo nano ./bash_profile
This open a new file in nano which I think was then saved. After this I opened the real .bash_profile to add in the path for node.js.
If I can get to the .bash_profile I think I can get it back on track but I can't find it, should I reinstall bash? If so how would I do that on a mac, I tried using
brew install bash
to which I get
-bash: brew: command not found
I am really stuck if anyone can help I would be really appreciated.
Many thanks
bash. – Gjallar Nov 2 '12 at 9:52-bash: export: '/Users/rob/Applications/sbt/bin:': not a valid identifierhas gone. The one thing I am struggling with is were the first line might be stored, I have looked in my .bash_profile, .profile and .bashrc but nothing. – Strangeone Nov 2 '12 at 11:16/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/go/binto my .bash_profile and it seems to have fixed bash but I still get this error-bash: export: '/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/go/bin': not a valid identifierAny ideas? – Strangeone Nov 2 '12 at 11:24PATH="/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/go/bin:$PATH" # Make sure to use double quotes not single quotesAnd on a new lineexport PATH. – Gjallar Nov 2 '12 at 11:32