Interpreter directive


An interpreter directive is a computer language construct, that on some systems is better described as an aspect of the system's executable file format, that is used to control which interpreter parses and interprets the instructions in a computer program.
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 often referred to as shebang, prefix the first line in a script, with the remainder of the line being a command usually limited to a max of 14 up to usually about 80 characters in 2016. If the file system permissions on the script include an execute permission bit for the user invoking it by its filename, it is used to tell the operating system what interpreter 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.
Other systems or files may use some other magic number as the interpreter directives.