How to Run a Script
Simply speaking, executing a script is as easy as typing its name at the shell prompt. Of course, if that were all there was to it, a whole section wouldn't be dedicated to it, now would it? A number of pieces must fall into place for a script to be executed. Here are a few of the prerequisites for script execution:
The permissions must be correct.
You must be able to locate the script through the PATH variable or through an absolute file specification.
System resources must be available to support the execution of the script.
The correct shell must be invoked to interpret the script's contents.
The script's syntax must be correct.
All files referenced during the run must be available.
The user interaction must be reasonable.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access