Wednesday, August 26, 2009

How to execute install.sh?

Few days ago, my friend was having a problem on setting Tomcat in his Linux box, and he got no clue on how this file is going to execute?

The file actually is using bash command, to execute it, that file must be granted an execute permission by doing this:

chmod +x install.sh

By granting the execute permission on a file, now the file can be executed just like below:

./install-sh

Without granting the permission, the file has to be execute in following method:

sh install.sh
bash install.sh

But base on my working experience, that file will be granted an executable permission if the source is dedicated for linux. Unless it is dedicated for Windows.

[Reference]
  1. http://www.cyberciti.biz/faq/run-execute-sh-shell-script/

No comments: