Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am running Ubuntu 12.04 LTS and I can't seem to be able to run .sh files.

I have marked it as executable in properties and I tried to run it through the GUI. However, the terminal just flashed on the screen and doesn't do anything.

When I try to run the file through the terminal I get the following error : 2: Syntax error: newline unexpected
share|improve this question
please tell us where you got this file from? – hakermania Aug 23 '12 at 13:33
Please post this file on and link to it in your original question. – SirCharlo Aug 23 '12 at 13:36
sounds like a bash/dash/sh/zsh difference – Cédric Julien Aug 23 '12 at 13:42
This might be because the old minecraft .sh file or the java program running in your machine. – devav2 Aug 23 '12 at 13:46
up vote 4 down vote accepted

Try downloading and running the file again. It works for me.

Here is (as of August 23rd 2012).

1 - Copy and paste the text in a new file named in your home directory.

2 - Now, open Terminal and run the following command:

bash ~/

It should work!

share|improve this answer
thank you. i got it working – sgpthomas Aug 26 '12 at 1:50
i am having the same problem with mcedit. can you help me? – sgpthomas Aug 26 '12 at 1:52

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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