I think you want to replace "shell" with "kernel". I suppose it could be in libc, but I'm certain it's not in /bin/sh, except for cygwin.
No, sorry, shells have to have a fallback mechanism if your O/S claims POSIX compatibility. See Re^2: Shebang behavior with perl. It's not in libc. But yes, usually the kernel extracts the interpreter and the argument (note: singular) from the shebang line.
Alexander
In reply to Re^9: shebang anomaly
by afoken
in thread shebang anomaly
by perlboy_emeritus
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |