note Hue-Bond <blockquote><i>To the shell. &#91;...&#93; At least on unixish systems, there is always a shell involved in this process</i></blockquote> <p>The #! line, also called shebang, tells nothing to any shell. It's the kernel who interprets it. When the first two bytes of an executable file are #!, the kernel runs the command that follows them, with the parameters specified, and feeds it the whole file on its standard input:</p> <c>$ cat > a #!/usr/bin/tail -n2 1 2 3 4 5 6 7 ^D $ chmod +x a $ ./a 6 7 $ strace ./a 2>&1 | grep -c sh 0</c> <div class="pmsig"><div class="pmsig-489671"> <p>-- <br /> David Serrano</p> </div></div> 860 557400