1.

What Is Shebang In A Shell Script?

Answer»

Shebang is a # sign followed by an exclamation i.e. !. Generally, this can be seen at the beginning or top of the script/program. USUALLY, a developer uses this to AVOID repetitive work. Shebang mainly determines the location of the engine which is to be USED in order to execute the script.

Here ‘#’ SYMBOL is called as hash and ‘!’ is called a bang.

Example: #!/bin/bash

The above line also tells which SHELL to use.

Shebang is a # sign followed by an exclamation i.e. !. Generally, this can be seen at the beginning or top of the script/program. Usually, a developer uses this to avoid repetitive work. Shebang mainly determines the location of the engine which is to be used in order to execute the script.

Here ‘#’ symbol is called as hash and ‘!’ is called a bang.

Example: #!/bin/bash

The above line also tells which shell to use.



Discussion

No Comment Found