#! syntax is used in scripts to indicate an interpreter for execution under UNIX/Linux Operating System.
#!/bin/bash
#!/usr/bin/env bash
- #! is called Shebang or bang line.
- It is nothing but absolute path of BASH.
- It conists of #! followed by interpreter's path.
- All script run on the specific interpretor.
- Almost all scripts begin with #!/bin/bash.
- Shebang was introduced Dennis Ritchie.
#!/bin/sh -> Used for system boot script.
#!/bin/bash -> Used for typical scripts.
#!/usr/bin/env bash -> Run bash in modified environment. Makes BASH script portable. Uses whichever bash executable appear first in user's PATH.