Shebang: Difference between revisions
Jump to navigation
Jump to search
Line 10: | Line 10: | ||
The <code>#!</code> sequence of characters at the beginning of a file indicates that the file is a script: a set of commands to be fed into an interpreter. The path that follows <code>#!</code> is the path to the program that interprets the commands in the script, whether it be a shell, a programming language, or a utility. The interpreter executes the commands in the script, starting with the line following the <code>#!</code> line: | The <code>#!</code> sequence of characters at the beginning of a file indicates that the file is a script: a set of commands to be fed into an interpreter. The path that follows <code>#!</code> is the path to the program that interprets the commands in the script, whether it be a shell, a programming language, or a utility. The interpreter executes the commands in the script, starting with the line following the <code>#!</code> line: | ||
<syntaxhighlight lang=' | <syntaxhighlight lang='text'> | ||
#! <interpreter> [optional-args] | #! <interpreter> [optional-args] | ||
</syntaxhighlight> | </syntaxhighlight> |
Revision as of 22:04, 1 May 2023
External
- https://en.wikipedia.org/wiki/Shebang_(Unix)#:~:text=In%20computing%2C%20a%20shebang%20is,bang%2C%20or%20hash%2Dpling.
- https://tldp.org/LDP/abs/html/sha-bang.html
Internal
Overview
The #!
sequence of characters at the beginning of a file indicates that the file is a script: a set of commands to be fed into an interpreter. The path that follows #!
is the path to the program that interprets the commands in the script, whether it be a shell, a programming language, or a utility. The interpreter executes the commands in the script, starting with the line following the #!
line:
#! <interpreter> [optional-args]