Usage and Best Practices of Linux Shebang (#!)

In many script files, we can see the following code on the <span>first line</span>: #!/bin/bash 或 #!/usr/bin/env python Carefully observe that the first line of the script file starts with the characters <span>#!</span>. This character sequence consisting of <span>hash</span> and <span>exclamation mark</span> is called <span>Shebang</span> (also known as <span>Hashbang</span>). Its purpose is to tell the … Read more