Jump to content

Talk:Thompson shell

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
(Redirected from Talk:Original Unix shell)

Page Alteration Proposal - Globbing

[edit]

I will not be able to complete the following proposed change anytime soon, as my time is simply too short. If anybody else is interested, feel free to do it. —Preceding unsigned comment added by Jneitzel (talkcontribs) 02:25, 22 June 2008 (UTC)[reply]

I propose that some information about the Thompson shell's globbing feature be added to this article in addition to the information about redirection and piping that is already present. After all, globbing has existed as one of the core features of the original Unix shell since at least First Edition (V1) Unix. Though the source code is not available, the documentation certainly is.

Even though globbing at the time only supported the * and ? metacharacters and not [...], it is important enough that it should be present. I will add it next weekend when I have the time to do so if that is acceptable. I will also add a link the the glob (programming) article.

For anyone who cares to know more about this, the globbing capabilities are documented on dmr's website at Unix Manual, first edition on the specified pages in the following PDF files: Commands, part 3 (see SH(I) on page 13) and Miscellaneous (see GLOB(VII) on page 10).

--JNeitzel (talk) 16:35, 13 April 2008 (UTC)[reply]

Previous Discussions

[edit]

The main article says that Ken Thompson wrote the Original UNIX Shell, and that it remained the default shell up to and including Version 6.

Way back when I was in University I read an article, by John Mashey, about the PWB shell, of which he was an author. He listed the shells that preceded his. Thompson's was the first. But other shells had preceded his, and Thompson's shell was no longer in use. IIRC Mashey's article was published in 1977 or 1978, in a journal named Software practice and experience. -- —Preceding unsigned comment added by Geo Swan (talkcontribs) 22:08, 2004 November 18


This article should be the Mashey Shell. Most features that have any precedece come from his additions.


I've added a link to a site with manual pages and other information about the early Unix shells. If someone feels like it, they can add more detailed information to the article proper. The First Edition Unix manual from Dennis Ritchie's site may also be of use.

Beinsane 01:11, 23 Nov 2004 (UTC)

For the record the early Bourne shell pipe syntax included using the ^ character instead of the | "pipe" character. For example:

  • command1 < stdin ^ command2 ^ command3 > stdout,

As well as the now standard:

  • command1 < stdin | command2 | command3 > stdout

I would GUESS that this use of the ^ char came from the Thompson_shell. Anyone? NevilleDNZ 11:00, 12 January 2006 (UTC)[reply]

I can confirm that the syntax to pipe commands in sh from Unix V1 to V6 is cmd1 ^ cmd2. The bourne shell has cmd1 | cmd2, and cmd1 ^ cmd2 as well for backward compatibility.

Aige02 at gmail (talk) 19:27, 11 February 2021 (UTC), corrected Aige02 at gmail (talk) 20:38, 11 February 2021 (UTC)[reply]

I can confirm the pipe change as introduced by Steve Bourne.

I have a point of contention about the suggestion that the article be termed "The Mashey Shell". I worked with the Bell Labs Unix Support Group (USG) in 1973 and modified the shell for release in (USG) Generic 3. I think some of the changes that are being attributed to the Mashey shell were first introduced in the Generic 3 shell (not to be confused with Research Version 3). I worked on the research shell to prepare it for release by the USG as part of Generic 3. I was an active member of the USG from 1973 until 1978. That shell is probably the last shell with major changes that was not named after its author. My major changes were (and are documented in the Generic 3 Programmer's Manual (again, not to be confused with any Research version of the manual) of which I still have a copy, but have not yet found online so no reference link):

  1. General purpose shell variables. Mashey added $a through $z, but they could only be set via a built-in read command. I added the built-in set command to make $a-$z general purpose variables.
  2. Special purpose shell variables such as $P and $R (modern equivalents are $$ and $?).
  3. A function to handle interrupts. The Mashey shell introduced a "goto on interrupt" concept, but that shell could not easily resume at the point of interrupt. The Generic 3 shell kept track of the position within a shell script and had a built-in return which would resume at the statement after the one that was interrupt. Generic 3 shell only handled the SIGINTR. The Bourne shell extended this concept with the built-in trap statement which structured the handler and allowed handling other signals.
  4. The research shell did not handle redirecting the error output at all. A command was available to deal with that, but not flexibly. The Generic 3 shell added a means of easily redirecting the error output (%outfile or %%outfile) that was the predecessor to Bourne's "2>outfile or 2>>outfile".

Bourne shell date

[edit]

This article contradicts the article Bourne shell on the date when the Bourne shell was released. I have posted a query about it at Talk:Bourne shell. Can anyone clear it up? The editor who uses the pseudonym "JamesBWatson" (talk) 16:30, 27 November 2015 (UTC)[reply]

First version

[edit]

According to Ritchie first version existed when "Ken's system" was made self-supporting on PDP-7 [1]. It was distributed along with first Unix edition but it did exist before. Ipr1 (talk) 09:17, 15 October 2019 (UTC)[reply]