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

In my terminal:

anon@anon-K53U:~/Desktop/FTL/data$ ls
amd64  exe_icon.bmp  FTL  licenses  resources  x86
anon@anon-K53U:~/Desktop/FTL/data$ sudo bash ./FTL.sh
[sudo] password for anon: 
bash: ./FTL.sh: No such file or directory
anon@anon-K53U:~/Desktop/FTL/data$ sh FTL.sh
sh: 0: Can't open FTL.sh
anon@anon-K53U:~/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. –  Shutupsquare Sep 20 '13 at 9:27

2 Answers 2

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.