Make a file executable
Shell scripts must be executable files in order to run. You can use the
chmod tool to indicate that the text file is executable (that is, its contents can be run as a shell script).
Enter the following command:
chmod 755 YourScriptName.sh
After making the shell script file executable, you can run it by entering its pathname. For example:
For more information about using
chmod, see its man page.