The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
* [TUHS] Which years saw the introduction of (1) #! and (2) symbolic links
@ 2020-12-29  0:30 ron minnich
  2020-12-29  1:04 ` Ron Natalie
  2020-12-29  1:41 ` Jeremy C. Reed
  0 siblings, 2 replies; 6+ messages in thread
From: ron minnich @ 2020-12-29  0:30 UTC (permalink / raw)
  To: TUHS main list

I think I remember but want to ask the experts.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [TUHS] Which years saw the introduction of (1) #! and (2) symbolic links
  2020-12-29  0:30 [TUHS] Which years saw the introduction of (1) #! and (2) symbolic links ron minnich
@ 2020-12-29  1:04 ` Ron Natalie
  2020-12-29  2:07   ` Clem Cole
  2020-12-29  1:41 ` Jeremy C. Reed
  1 sibling, 1 reply; 6+ messages in thread
From: Ron Natalie @ 2020-12-29  1:04 UTC (permalink / raw)
  To: ron minnich, TUHS main list

Symlinks came out in 4.1BSD (1981), I think.
#! came out in 4. (1980
)
------ Original Message ------
From: "ron minnich" <rminnich@gmail.com>
To: "TUHS main list" <tuhs@minnie.tuhs.org>
Sent: 12/28/2020 7:30:47 PM
Subject: [TUHS] Which years saw the introduction of (1) #! and (2) 
symbolic links

>I think I remember but want to ask the experts.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [TUHS] Which years saw the introduction of (1) #! and (2) symbolic links
  2020-12-29  0:30 [TUHS] Which years saw the introduction of (1) #! and (2) symbolic links ron minnich
  2020-12-29  1:04 ` Ron Natalie
@ 2020-12-29  1:41 ` Jeremy C. Reed
  1 sibling, 0 replies; 6+ messages in thread
From: Jeremy C. Reed @ 2020-12-29  1:41 UTC (permalink / raw)
  To: ron minnich; +Cc: TUHS main list

(Just first question here ...)

Early BSD shells could look at first bytes (0404) to indicate was a 
pascal object to run the Berkeley pascal interpreter.
When csh was introduced, the csh would run the other shell /bin/sh if 
the first character was not a # pound.  So csh used the single # as 
magic to run the script with csh. The # was a comment for csh, make, and 
awk (but not for standard sh which could use a : colon for the comment).

Have a look at top of 4BSD's /usr/src/sys/newsys/sys1.c below. This code 
is not in v7 nor 32V.

From uucp Thu Jan 10 01:37:58 1980
>From dmr Thu Jan 10 04:25:49 1980 remote from research
The system has been changed so that if a file being executed
begins with the magic characters #! , the rest of the line is understood
to be the name of an interpreter for the executed file.
Previously (and in fact still) the shell did much of this job;
it automatically executed itself on a text file with executable mode
when the text file's name was typed as a command.
Putting the facility into the system gives the following
benefits.

1) It makes shell scripts more like real executable files,
because they can be the subject of 'exec.'

2) If you do a 'ps' while such a command is running, its real
name appears instead of 'sh'.
Likewise, accounting is done on the basis of the real name.

3) Shell scripts can be set-user-ID.

4) It is simpler to have alternate shells available;
e.g. if you like the Berkeley csh there is no question about
which shell is to interpret a file.

5) It will allow other interpreters to fit in more smoothly.

To take advantage of this wonderful opportunity,
put

	#! /bin/sh

at the left margin of the first line of your shell scripts.
Blanks after ! are OK.  Use a complete pathname (no search is done).
At the moment the whole line is restricted to 16 characters but
this limit will be raised.


From uucp Thu Jan 10 01:37:49 1980
>From dmr Thu Jan 10 04:23:53 1980 remote from research


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [TUHS] Which years saw the introduction of (1) #! and (2) symbolic links
  2020-12-29  1:04 ` Ron Natalie
@ 2020-12-29  2:07   ` Clem Cole
  2020-12-29  5:03     ` ron minnich
  0 siblings, 1 reply; 6+ messages in thread
From: Clem Cole @ 2020-12-29  2:07 UTC (permalink / raw)
  To: Ron Natalie; +Cc: TUHS main list

[-- Attachment #1: Type: text/plain, Size: 1003 bytes --]

FYI: Dennis did symlinks before Joy did and it was 4.1a where they first
show up in the BSD stream
As for shebang, the idiom was recognized by the shell in user space in 1.0
BSD, when the precursor to cshell (the Berkeley shell) was released -  but
it took a while to make it into the kernel as recognized look-a-side to be
more automatic.   My >>memory<< is we had it in the 2BSD release, but it
might not have been added until 3BSD - look at the exec.c code in the BSD
kernels which frankly I'm too lazy tonight to do myself.
ᐧ

On Mon, Dec 28, 2020 at 8:11 PM Ron Natalie <ron@ronnatalie.com> wrote:

> Symlinks came out in 4.1BSD (1981), I think.
> #! came out in 4. (1980
> )
> ------ Original Message ------
> From: "ron minnich" <rminnich@gmail.com>
> To: "TUHS main list" <tuhs@minnie.tuhs.org>
> Sent: 12/28/2020 7:30:47 PM
> Subject: [TUHS] Which years saw the introduction of (1) #! and (2)
> symbolic links
>
> >I think I remember but want to ask the experts.
>
>

[-- Attachment #2: Type: text/html, Size: 1916 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [TUHS] Which years saw the introduction of (1) #! and (2) symbolic links
  2020-12-29  2:07   ` Clem Cole
@ 2020-12-29  5:03     ` ron minnich
  2020-12-30 17:15       ` Clem Cole
  0 siblings, 1 reply; 6+ messages in thread
From: ron minnich @ 2020-12-29  5:03 UTC (permalink / raw)
  To: Clem Cole; +Cc: TUHS main list

[-- Attachment #1: Type: text/plain, Size: 1215 bytes --]

reason I asked was my memory was #! in 1978 or so. But that's now sounding
like I compressed time a bit.

On Mon, Dec 28, 2020 at 6:08 PM Clem Cole <clemc@ccc.com> wrote:

> FYI: Dennis did symlinks before Joy did and it was 4.1a where they first
> show up in the BSD stream
> As for shebang, the idiom was recognized by the shell in user space in 1.0
> BSD, when the precursor to cshell (the Berkeley shell) was released -  but
> it took a while to make it into the kernel as recognized look-a-side to be
> more automatic.   My >>memory<< is we had it in the 2BSD release, but it
> might not have been added until 3BSD - look at the exec.c code in the BSD
> kernels which frankly I'm too lazy tonight to do myself.
> ᐧ
>
> On Mon, Dec 28, 2020 at 8:11 PM Ron Natalie <ron@ronnatalie.com> wrote:
>
>> Symlinks came out in 4.1BSD (1981), I think.
>> #! came out in 4. (1980
>> )
>> ------ Original Message ------
>> From: "ron minnich" <rminnich@gmail.com>
>> To: "TUHS main list" <tuhs@minnie.tuhs.org>
>> Sent: 12/28/2020 7:30:47 PM
>> Subject: [TUHS] Which years saw the introduction of (1) #! and (2)
>> symbolic links
>>
>> >I think I remember but want to ask the experts.
>>
>>

[-- Attachment #2: Type: text/html, Size: 2387 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [TUHS] Which years saw the introduction of (1) #! and (2) symbolic links
  2020-12-29  5:03     ` ron minnich
@ 2020-12-30 17:15       ` Clem Cole
  0 siblings, 0 replies; 6+ messages in thread
From: Clem Cole @ 2020-12-30 17:15 UTC (permalink / raw)
  To: ron minnich; +Cc: TUHS main list

[-- Attachment #1: Type: text/plain, Size: 939 bytes --]

On Tue, Dec 29, 2020 at 12:03 AM ron minnich <rminnich@gmail.com> wrote:

> reason I asked was my memory was #! in 1978 or so. But that's now sounding
> like I compressed time a bit.
>
Sounds a little early for my memory for the kernel, but about right for the
support using the shells.  I would have thought we talked about the idea at
the Summer '79 USENIX and later Dennis implemented a patch for Research
Unix which it looks like he released it in early 1980.    But if I'm not
getting my dates wrong, that should have been before 3BSD was released for
the Vax; which syncs with my memory that it was in 3BSD.  Due to address
space issues on the 11, add features to the kernel that we could do in
userspace, was often the preferred place. I just don't remember if Joy had
it in the 2BSD kernel before Dennis added it to the research kernel, but I
do remember it was in shells @ UCB as Jeremy said much earlier.


ᐧ

[-- Attachment #2: Type: text/html, Size: 2009 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-12-30 17:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-29  0:30 [TUHS] Which years saw the introduction of (1) #! and (2) symbolic links ron minnich
2020-12-29  1:04 ` Ron Natalie
2020-12-29  2:07   ` Clem Cole
2020-12-29  5:03     ` ron minnich
2020-12-30 17:15       ` Clem Cole
2020-12-29  1:41 ` Jeremy C. Reed

The Unix Heritage Society mailing list

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.vuxu.org/tuhs

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 tuhs tuhs/ http://inbox.vuxu.org/tuhs \
		tuhs@minnie.tuhs.org
	public-inbox-index tuhs

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.tuhs


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git