Thompson shell

Thompson shell
Thompson shell
Original author(s) Ken Thompson
Initial release 1971
Operating system Unix
License Unix shell

The Thompson shell was the first Unix shell, introduced in the first version of Unix in 1971, and was written by Ken Thompson.[1] It was a simple command interpreter, not designed for scripting, but nonetheless introduced several innovative features to the command line interface and led to the development of the later Unix shells.

Contents

History

The name "shell" for a command line interpreter and the concept of making the shell a user program outside of the operating system kernel were introduced in Unix's precursor Multics.

An early feature of the Thompson shell was a compact syntax for input/output redirection. In Multics, redirecting the input or output of a command required separate commands to start and stop redirection; in Unix, one could simply add an argument to the command line consisting of the < symbol followed by a filename for input or the > symbol for output, and the shell would redirect I/O for the duration of the command. This syntax was already present by the release of the first version of Unix in 1971.

A later addition was the concept of pipes. At the suggestion of Douglas McIlroy, the redirection syntax was expanded so that the output of one command could be passed to the input of another command. The original pipe syntax, as described in the Version 3 manual, was:

command1 >command2>

This syntax proved too ambiguous and was easily confused with redirection to and from files. By Version 4, the syntax had changed to use both the | and ^ symbols to denote pipes:

command1 | command2

This produces exactly the same result as:

command1 ^ command2

The Thompson shell syntax for redirection with < and >, and piping with |, has proven durable and has been adopted by most other Unix shells and command shells of several other operating systems, most notably on DOS, OS/2 and Microsoft Windows.

Decline and replacements

The shell's design was intentionally minimalistic; even the if and goto statements, essential for control of program flow, were implemented as separate commands.[1] As a result, by the 1975 release of Unix Version 6, it was becoming clear that the Thompson shell was inadequate for most serious programming tasks.

At this time, the developers of the Programmer's Workbench UNIX distribution, most notably John Mashey, began modifying the Thompson shell to make it more suitable for programming.[1] The result, known as the PWB shell or the Mashey shell, included more advanced flow-control mechanisms and introduced shell variables, but remained limited by the necessity to remain compatible with the Thompson shell.

Finally, the Thompson shell was replaced as the main Unix shell by the Bourne shell in Unix Version 7 and the C shell in 2BSD, both released in 1979. Since virtually all modern Unix and Unix-like systems are descended from V7 and 2BSD, the Thompson shell is generally no longer used. It is, however, available as open source as part of several Ancient Unix source distributions, and has been ported to modern Unices as a historical exhibit.

See also

  • Comparison of computer shells

References

  1. ^ a b c J. R. Mashey (1976-10-13). Using a Command Language as a High-Level Programming Language. Proceeding of the 2nd International Conference on Software Engineering. pp. 169-176. 

External links


Wikimedia Foundation. 2010.

Игры ⚽ Нужно решить контрольную?

Look at other dictionaries:

  • Thompson-Shell — osh ist eine Unix Shell, die die letzte Version des frühesten Unix Befehlsinterpreters (Thompson Shell) reimplementiert. Der Name osh steht für old shell, alte Shell. Inhaltsverzeichnis 1 Merkmale 2 Geschichte 3 Literatur 4 Weblinks // …   Deutsch Wikipedia

  • Thompson Shell — osh ist eine Unix Shell, die die letzte Version des frühesten Unix Befehlsinterpreters (Thompson Shell) reimplementiert. Der Name osh steht für old shell, alte Shell. Inhaltsverzeichnis 1 Merkmale 2 Geschichte 3 Literatur 4 Weblinks // …   Deutsch Wikipedia

  • Shell de UNIX — Este artículo trata sobre el intérprete típico de Unix. Para otros usos de este término, véase terminal (informática) . Pantalla durante una sesión muestra Bash, tomada en Gentoo Linux. Una Shell de Unix o también shell, es el término usado en… …   Wikipedia Español

  • Shell script — Командная оболочка UNIX (англ. Unix shell, часто просто «шелл» или «sh») командный интерпретатор, используемый в операционных системах семейства POSIX совместимые оболочки, восходящие к Bourne shell, появившемуся в Unix Version 7. Содержание 1… …   Википедия

  • Thompson Center Arms — Thompson/Center Arms Company is an American firearms company based in Rochester, New Hampshire. The company is best known for its line of interchangeable barrel single shot pistols, and its muzzleloading rifles, though they have recently added a… …   Wikipedia

  • Shell (computing) — A shell is a piece of software that provides an interface for users of an operating system which provides access to the services of a kernel. However, the term is also applied very loosely to applications and may include any software that is… …   Wikipedia

  • Bourne-Again-Shell — Die Unix Shell oder kurz Shell (en. Hülle, Schale) bezeichnet die traditionelle Benutzerschnittstelle unter Unix oder unixoiden Betriebssystemen. Der Benutzer kann in einer Eingabezeile Kommandos eintippen, die der Computer dann sogleich ausführt …   Deutsch Wikipedia

  • Bourne-Shell — Die Unix Shell oder kurz Shell (en. Hülle, Schale) bezeichnet die traditionelle Benutzerschnittstelle unter Unix oder unixoiden Betriebssystemen. Der Benutzer kann in einer Eingabezeile Kommandos eintippen, die der Computer dann sogleich ausführt …   Deutsch Wikipedia

  • Perl-Shell — Die Unix Shell oder kurz Shell (en. Hülle, Schale) bezeichnet die traditionelle Benutzerschnittstelle unter Unix oder unixoiden Betriebssystemen. Der Benutzer kann in einer Eingabezeile Kommandos eintippen, die der Computer dann sogleich ausführt …   Deutsch Wikipedia

  • Unix-Shell — Die Unix Shell oder kurz Shell (en. Hülle, Schale) bezeichnet die traditionelle Benutzerschnittstelle unter Unix oder unixoiden Computer Betriebssystemen. Der Benutzer kann in einer Eingabezeile Kommandos eintippen, die der Computer dann sogleich …   Deutsch Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”