Terminal repeatedly shows(A: command not found, B: command not found)

Asked by arvind das on 2011-01-26

I tried to set the PATH in .bashrc in UBUNTU for java. But after I completed writing the path, then saved it and exit, there was a problem in terminal saying "A: command not found , B; command not found and lasts. I can not do anything in the terminal now..oh God plz someone help me.
The above statement (A: command not found ,B:command not found) is printing repeatedly in terminal...:(
Thanks in advance

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu bash Edit question
Assignee:
No assignee Edit question
Solved by:
actionparsnip
Solved:
2011-01-28
Last query:
2011-01-28
Last reply:
2011-01-27

Can you give the output of:

echo $PATH

Thanks

arvind das (arvindgoku) said : #2

No, I can not do anything in terminal. When I open it, it only shows
A:command not found
B:command not found
and so on.........................................
Even I tried to search for the .bashrc file that I opened in vi editor to export the path but I was unable to found it.
Is there any way to restore Terminal?
:(

ok if you boot to root recovery mode, you can run:

cp /home/foo/.bashrc /home/foo/.bashrc_old; cp /root/.bashrc /home/foo/.bashrc; chown foo:foo /home/foo/.bashrc

change foo for your username

E.g.

cp /home/andy/.bashrc /home/andy/.bashrc_old; cp /root/.bashrc /home/andy/.bashrc; chown andy:andy /home/foo/.bashrc

Then reboot by running:

reboot

You should now have some sort of functionality, you can even rename the original bashrc file back in BUT remove the change you made before the mess

arvind das (arvindgoku) said : #4

Thanks actionparsnip, that solved my question.

arvind das (arvindgoku) said : #5

This solution killed my problem. Now, terminal is alive .Thank you for saving it.
Cheers