[1] In Unix, Linux and other Unix-like operating systems, the first two bytes in a file can be the characters "#!
", which constitute a magic number (hexadecimal 23 and 21, the ASCII values of "#" and "!")
If the file system permissions on the script (a file) include an execute permission bit for the user invoking it by its filename (often found through the command search path), it is used to tell the operating system what interpreter (usually a program that implements a scripting language) to use to execute the script's contents, which may be batch commands or might be intended for interactive use.
An example would be #!/bin/bash, meaning run this script with the bash shell found in the /bin directory.
[2][3][4][5][6][7] Other systems or files may use some other magic number as the interpreter directives.