What Is Shebang Linux or Bash Term? – POFTUT

What Is Shebang Linux or Bash Term?

In computing shebang is characters consist of number sign and exclamation mark #! . There is alternative names like she-bang, hash-bang, pound-bang or hash-pling

Shebang is generally used in script like text to specify script interpreter or type.  Some languages omit # as comment mark but with ! there is special meaning.


Shebang is generally used with interpreter specification only and no optional argument is provided.

Here interpreter is the application used to interpret following script. Most popular interpreters are Shell, Bash, Python, Perl, Php etc.

Bash is interpreter of the script. echo “poftut.com” will be interpreted as bash script and will print “poftut.com” to the default output.

Providing Parameters

As we see in syntax section parameters can be provided to the specified interpreter. For example it can be provided -x to enable debug in bash scripts like below.

Providing parameters to hashbang


Some operating system families process shebang differently. To make things more portable env technique can be used. This is useful if specified interpreter path is different in different operating systems. Directly the path defined in environment variable will be called.

LEARN MORE  Memcached Prepend Operation with Python Example

Leave a Reply

Your email address will not be published. Required fields are marked *

Enjoy this blog? Please spread the word :)