Skip to content

Instantly share code, notes, and snippets.

@thiagorider
Last active September 12, 2016 21:06
Show Gist options
  • Select an option

  • Save thiagorider/de4fc8e42b1006e7f134334e4da8b3f0 to your computer and use it in GitHub Desktop.

Select an option

Save thiagorider/de4fc8e42b1006e7f134334e4da8b3f0 to your computer and use it in GitHub Desktop.
Bash script snippets - Sha-bangs
#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
@thiagorider
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment