From DreamHost
Jump to: navigation, search

A shebang (also called a hashbang, hashpling, or pound bang) refers to a pair of characters "#!" that, when used as the first two characters on the first line of a script, causes Unix-like operating systems to execute that script using the interpreter specified by the rest of that line.

More precisely, a shebang line consists of a number sign and an exclamation point character ("#!"), followed by the (full) path to the interpreter program that will provide the interpretation. The shebang is looked for and used when a script is invoked directly (as you would a regular executable), and largely to the end of making scripts look and act similarly to regular executables, to the operating system and to the user.