A shell script in as much as a shell script is the combination of a text file containing a set of commands (each of which is individually runnable at the shell prompt) run by an instance of the shell interpreter.
I've always considered a perl script to be a specialization of a shell script in as much as the perl script ...
- only contains perl commands and ...
- uses the perl interpreter to run the script.
The normal way in which a script is made runnable in its' own right is to...
- chmod(1) the script file to give it execute rights c/w ...
- putting #! /usr/bin/sh (the shebang or hash-bang line) at the very top of the file
So, in order to convert your script (after granting execute rights to the script (via
chmod +x file), add the following at the very top of your script file:
#! /usr/bin/env perl
Does that help ??
A user level that continues to overstate my experience :-))