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 try to run a shell script file but failed so far on Ubuntu.

In my terminal:

~/Desktop/FTL/data$ ls
amd64  exe_icon.bmp  FTL  licenses  resources  x86
~/Desktop/FTL/data$ sudo bash ./FTL.sh
[sudo] password for anon: 
bash: ./FTL.sh: No such file or directory
~/Desktop/FTL/data$ sh FTL.sh
sh: 0: Can't open FTL.sh
~/Desktop/FTL/data$ 
share|improve this question
1  
You can use file FTL and the system will do its best to work out what it is and tell you. – squarebear Sep 20 '13 at 9:27

Well, as can be deduced from the output of ls command, the name of the file is FTL, not FTL.sh. So you should use:

sudo bash ./FTL

or

 sh ./FTL

or maybe only:

./FTL

Also be sure that the file is executable, by running:

chmod +x FTL
share|improve this answer

Always use this command for every script to be executed by server.

chmod +x filename.ext
share|improve this answer

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.