0

Whenever I open terminal in Ubuntu I get the following bash and I don't know how to solve it. I need a solution as soon as possible:

bash: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games: syntax error: operand expected (error token is "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games")
bash: /home/kaustubh/.bashrc: line 6: unexpected EOF while looking for matching `}'
bash: /home/kaustubh/.bashrc: line 118: syntax error: unexpected end of file
1

A script that is executed automatically when you start a shell seems to be broken. Based on your error message, it seems like it is .bashrc. Are you setting your $PATH in there? It seems like a } is missing in that statement.

| improve this answer | |
  • yeah before installing android sdk ubuntu used the following commands to setup the path using following command :- export PATH=$[PATH]:-/android-sdk/tools and export PATH=$[PATH]:-/android-sdk/tools/platform-tools – Kaustubh Shinde Sep 8 '14 at 7:12
1

I had a similar problem for few days and I could solve it with this code in a terminal:

cp /etc/skel/.bashrc ~

Try this, maybe it will solve yours too.

| improve this answer | |
  • Glad I could help. Please mark this question answered. – Gábor Varga Sep 8 '14 at 8:33
  • 2
    This is dangerous, it will overwrite the users' existing .bashrc file. At a minimum you should explain what this command does, not just say "try this". – dimo414 Jul 3 '15 at 17:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.