pdg77q
Last Updated: February 25, 2016
·
1.803K
· mlafeldt
2190d7a468f51fa3be5eabfc9397a28b

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:

http://lxr.linux.no/linux+*/fs/binfmt_script.c

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.

Say Thanks
Respond
Filed Under