Interpreter directive
This article may be confusing or unclear to readers. (February 2016) |
This article duplicates the scope of other articles, specifically Directive (programming) and Shebang (Unix). to the article. (March 2023) |
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.[1]
In
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.[citation needed]
See also
- Architecture description language
- Bourne shell
- C shell
- Command-line interface#Command-line interpreter
- Filename extension#Command name issues
- Shebang (Unix)
- Unix shell
References
- ISBN 978-0-7923-8425-0.
- ^ "Advanced Bash Scripting Guide". Retrieved 2012-01-19.
- ISBN 978-1-4357-5218-4.
- ISBN 978-1-4493-0239-9.
- ISBN 978-0-596-15806-4.
- ISBN 978-1-59059-519-0.
- ISBN 978-0-619-13004-6.