Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>That is called a <a href="http://en.wikipedia.org/wiki/Shebang_%28Unix%29">shebang</a>, it tells the shell what program to interpret the script with, when executed.</p> <p>In your example, the script is to be interpreted and run by the <a href="http://en.wikipedia.org/wiki/Bash_%28Unix_shell%29">bash</a> shell.</p> <p>Some other example shebangs are:</p> <p>(From Wikipedia)</p> <pre><code>#!/bin/sh — Execute the file using sh, the Bourne shell, or a compatible shell #!/bin/csh — Execute the file using csh, the C shell, or a compatible shell #!/usr/bin/perl -T — Execute using Perl with the option for taint checks #!/usr/bin/php — Execute the file using the PHP command line interpreter #!/usr/bin/python -O — Execute using Python with optimizations to code #!/usr/bin/ruby — Execute using Ruby </code></pre> <p>and a few additional ones I can think off the top of my head, such as:</p> <pre><code>#!/bin/ksh #!/bin/awk #!/bin/expect </code></pre> <p>In a script with the bash shebang, for example, you would write your code with bash syntax; whereas in a script with expect shebang, you would code it in expect syntax, and so on.</p> <p><strong>Response to updated portion:</strong></p> <p>It depends on what <code>/bin/sh</code> actually points to on your system. Often it is just a symlink to <code>/bin/bash</code>. Sometimes portable scripts are written with <code>#!/bin/sh</code> just to signify that it's a shell script, but it uses whichever shell is referred to by <code>/bin/sh</code> on that particular system (maybe it points to <code>/bin/bash</code>, <code>/bin/ksh</code> or <code>/bin/zsh</code>)</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload