You should have already looked at a Shell script with the first line starting with:


Well, the name given to this is Shebang (!#) and it is used to indicate which interpreter should read and execute the file. As was the case with Bash.

To use Shebang, we must include it in the first line of the file:


echo "Testing the interpreter"

To run this file, we need to assign execute permission to it:

$ chmod +x <file-name>

And now we run:

$ ./<file-name>

Note that we no longer need to say which interpreter will read and execute the file, as we already use Shebang.

The ./ Indicates that the file is in the current execution folder (.), the period (.) indicates the current folder and 2 points (..) the parent folder or 1 above.