Sunday, April 19, 2009

.sh files, How to run ...

Generally, .sh-scripts are Bourne Shell scripts or Bourne Again Shell scripts. So long as a script has a proper shebang-line, you should be able to run them as follows:

Code :
chmod +x file_Name.sh
./file_Name.sh

This works only if the execute-flag is set. If not you have to run the code called chmod to set the execution flag. The code is chmod +x. After the proper execute permissions have been set, they can be executed just like any normal executable. The shebang line* takes care of the executable that will interpret the file.

No comments: