Last Updated: February 25, 2016
· mlafeldt

How the Shebang is processed by the Linux kernel

This is the rather complicated C code that parses the shebang (#!) line at the start of a script and then executes it using the provided interpreter:


Many people don't know that this is actually done in the kernel. You can also see why passing multiple arguments to the interpreter will never work.