*** Welcome to piglix ***

Thompson shell

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

The Thompson shell is the first Unix shell, introduced in the first version of Unix in 1971, and was written by Ken Thompson. 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.

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:

This syntax proved too ambiguous and was easily confused with redirection to and from files--the system cannot tell if "command2" is the command "command2" or the file "command2". By Version 4, the syntax had changed to use both the | and ^ symbols to denote pipes:

This produces exactly the same result as:

The > symbol changed into:

This would put the output of command1 into file1.


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.


...
Wikipedia

...