Thompson Shell

from Wikipedia, the free encyclopedia

The command line interpreter developed with UNIX from 1969 is retronymously referred to as the Thompson shell after its developer Ken Thompson . Originally written in assembler , the original Unix shell was re-implemented in 1973 together with UNIX version 4 in C. sh

The Thompson shell is a first, very rudimentary variant of a Unix shell, but many later, improved and expanded Unix shells can be traced back to it. It is no longer used on modern Unix and Unix-like systems, but the last version has been reimplemented for modern systems .

history

UNICS, as the system was called in 1969 as a pun and an allusion to the earlier Multics operating system project , used some of the Multics concepts, on which some later Unix developers such as Ken Thompson, Doug McIlroy , Dennis Ritchie and Joseph Ossanna had briefly worked. One of them was the shell . For example, UNIX - the spelling was used with the publication of the first version at the latest in 1971 - consisted of the core components of the Unix file system and the Unix shell in addition to the kernel . As early as 1972, Doug McIlroy's command and filter chain concept ( pipes ) was implemented in this shell.

The Thompson shell ( sh) was the standard shell of AT&T UNIX until the release of V7 UNIX (1979). As early as the 1970s, Stephen R. Bourne developed an improved Unix shell that replaced the Thompson shell from V7 UNIX . The Bourne shell is also shexecuted. But other, later, more modern Unix shells also use the syntax introduced by the Thompson shell in addition to the executable file name ; Among other things, the use of upper and lower characters for redirecting inputs and outputs were first used in the Thompson shell .

features

The Thompson shell has the core properties of a Unix shell:

  • Command or filter chains ( pipes , "pipelines")
  • Redirection of program inputs and outputs
  • Summaries of commands or command chains in command files (shell scripts )

In contrast to more modern Unix shells, which are command interpreters and programming languages , the Thompson shell does not have its own programming constructs. The instructions ifand gotoare implemented as separate commands with which certain programming tasks (conditional control of the program sequence) can be solved, but the possibility of agreeing variables is not available . However, several arguments can be passed to the command interpreter, which indirectly simulates the function of variables by calling new shell instances.

Reimplementation

As oshthe Thompson shell was reimplemented for modern Unix-like operating systems. The name comes from the English old shell , "old shell". Their successor is withetshthe enhanced Thompson shell . In contrast to the original Thompson shell from the early 1970s, environment variables can be set directly in both ; When used as the primary shell, the re-implementations also read a profile file administered by the user, e.g. B. for setting path information.

literature

  • Ken Thompson: The UNIX Command Language. In: Structured Programming - International Computer State of the Art Report, Infotech Information Ltd. Maidenhead, Berkshire, 1975, pp. 375-384.

Web links

Individual evidence

  1. University of Michigan (Ed.): Programmer's Journal . tape 5 . Avant-Garde Creations, 1987, pp. 16 (English, no preview available ): "Ken Thompson, the father of Unix, wrote the very first rudimentary command interface for Ma Bell's OS — in typical researcher fashion calling it the Thompson shell."
  2. Isrd: Basics Of Os Unix And Shell Programming . Tata McGraw-Hill Education, 2006, ISBN 978-0-07-061681-3 (English, limited preview in Google Book Search): “MULTICS exerted a strong influence on the new operating system. The basic file system organization, the idea of the shell as a user process, use of separate process for each command and similar other features were inherited from it. "
  3. ^ Michael L. Scott: Programming Language Pragmatics . Morgan Kaufmann, 2009, ISBN 978-0-08-092299-7 (English, limited preview in the Google book search): “When work began on the groundbreaking multics system in 1964, [Louis] Pouzin sketched the design of an extended command language, with quoting and argument-passing mechanisms, for which he coined the term "shell." "
  4. SK Bajpai: Introduction To Computers And C Programming . New Age International, 2007, ISBN 978-81-224-1379-3 (English, limited preview in Google Book Search): “UNIX… has basically the following parts: Kernel…, Shell…, The file system…”