BSD added the #! "magic number" based on a suggestion from Ken I believe. 

Didn't the exec (2) manpage warn about argv[-1] being clobbered until that was added?

On Sun, Aug 4, 2019, 4:31 PM Clem Cole <clemc@ccc.com> wrote:


On Sun, Aug 4, 2019 at 4:18 PM Noel Chiappa <jnc@mercury.lcs.mit.edu> wrote:
Part of the problem is having the kernel involved in starting shell scripts; convenient in some ways, but V6 etc worked fine without that 'feature'.
That's a tough call.  I have mixed opinions about it as a feature.  I kind of like the user/kernel interface really, really thin and unadorned.

Adding, it certainly made allowing multiple interpreters to be supported much easier; but as you say it opens a new can of worms.   Given the later proliferation of what bwk or Jon Bently once referred too as 'little languages' (awk, perl, tcl, and sigh eventually python), it was probably a good feature.

But as you said, v6 worked fairly well without it.

Clem