Eliminate the word notation so there will not be confusion here.
To indicate the shell for which a script is written, use the following on the first line of your script:
When you run the script, the shell looks for #! on the first line. After finding it, your script runs using the indicated shell
Does that mean it first starts the shell? Or does it not have to start a shell in order torun a script with it?
I purposely did not explain this in detail because it gets involved. It will not matter to someone writing a script –
they just need to know that the shell is indicated on the #! Line. Using #! on the first line of your script ensures that your script will run using the correct shell. If this line is not inserted at the top of your script, then your shell might assume you are using Bourne, Korn, or C shell without any consistency.
It is better to know which shell your script will be run under by including the #! on the first line.
Of the three techniques
listed in the previous lesson, only technique number one (typing the script name in on the command line) reads the first line of the file to check for the #!.
The other two techniques see the #! line as a commentany particular reason that this happens, or is that totally irrelevant?
Just theway the techniques work.
The next lesson looks at the shell PATH variable.