On Sun, Sep 11, 2016 at 1:39 PM, Doug McIlroy <doug@cs.dartmouth.edu> wrote:
I recall Dennis discussing the feature at some length before installing it.
So the exact semantics, especially the injected argument, are almost]
certainly his. I don't know whether he built on a model from elsewhere.
#! appeared between v7 (1979) and v8 (1985). As v8 was never released,
it clearly made its way into the world via BSD and USG. BSD, being
more nimble, was likely first.

​Well that tracks my memory. I also thought it was from BSD, although it might have come from some place else like Harvard, MIT, Ill, Rice or the like.  It is not in the V7 sources in Warren's code repository but I do remember it in my customized V7 (polite form of hacking)​ at Tektronix on our 11/70 and 11/44 in late 1979/early 1980 before I went to UCB.  But I do not remember that extension @ CMU (the tapes which I have had a hard time getting read so I can not check).  

I'm a little hazy, but I think it means that Mark Bales/Jim Kleckner gave it to me with BSD stuff when we picked up csh, vi and pas @ Tek - which we originally did in drips and drabs - during their time as summer students.  (I would not get an official set of 1BSD or 2BSD tapes for Tek until right before I left for Berkeley a couple of years later).

BTW: It's also possible that's how fsck originally made it back to UCB (but tjk might have given it to Joy directly), as Mark and Jim took back my collection of CMU hacks at the end of that summer which was either 79 or 80.  I do remember Mark being impressed with fsck.

Clem