Last active
September 12, 2016 21:06
-
-
Save thiagorider/de4fc8e42b1006e7f134334e4da8b3f0 to your computer and use it in GitHub Desktop.
Bash script snippets - Sha-bangs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #The sha-bang# | |
| # The sha-bang ( #!) [1] at the head of a script tells your system that this file is a set of commands to be fed to the command | |
| # interpreter indicated. The #! is actually a two-byte [2] magic number, a special marker that designates a file type, or in this | |
| # case an executable shell script (type man magic for more details on this fascinating topic). Immediately following the sha-bang | |
| # is a path name. This is the path to the program that interprets the commands in the script, whether it be a shell, a | |
| # programming language, or a utility. This command interpreter then executes the commands in the script, starting at the top (the | |
| # line following the sha-bang line), and ignoring comments. | |
| #!/bin/sh | |
| #!/bin/bash | |
| #!/usr/bin/perl | |
| #!/usr/bin/tcl | |
| #!/bin/sed -f | |
| #!/bin/awk -f |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Explanation from http://tldp.org/LDP/abs/html/sha-bang.html