Title: What is the shebang? (Shell scripts)
Author: Sandro Tosi
Last modified: 2006-06-02 (2006-04-11)
A "shebang" (aka shbang) line is the very first a line of a script,
beginning with "#!", to tell the operating system which interpreter to
use to process the script (for example "#!/bin/bash").
It's a magic code, to tell the kernel to treat the file as a script
rather than as machine code program (see man magic).
The shebang line consists of a hash mark "#", an exclamation point "!"
(called a bang), followed by the full pathname of the shell, and any
shell options. Any other lines beginning with a # are used as
comments.
Shebang line does _not_ indicate executability, it's just a convention
to indicate a script instead of machine code (see e.g.
http://foldoc.org/?shebang)
|