Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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 :

Minecraft_Installer_20.sh: 2: Minecraft_Installer_20.sh: Syntax error: newline unexpected
share|improve this question
1  
please tell us where you got this file from? –  hakermania Aug 23 '12 at 13:33
1  
Please post this file on paste.ubuntu.com and link to it in your original question. –  SirCharlo Aug 23 '12 at 13:36
1  
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

1 Answer 1

up vote 4 down vote accepted

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

Here is Minecraft_Installer_20.sh (as of August 23rd 2012).


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

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

bash ~/Minecraft_Installer_20.sh

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

 
discard

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.