PWB shell

PWB shell

The PWB shell (also known as the Mashey shell) was an early Unix shell.[1]

Distributed with some versions of Programmer's Workbench UNIX circa 1975-1977, it was a modified (and generally constrained to be upward-compatible) version of the Thompson shell with additional features to increase usability for programming, and was maintained by John Mashey and various others (Dick Haight, Alan Glasser).[1]

Contents

Notable features

Although it was soon superseded by the Bourne shell, several features introduced in the PWB shell remain in many later shells. The if and goto commands were made internal to the shell, and extended to allow if-then-else-endif, and switch and while constructs were introduced, as well as onintr to ignore interrupts or catch them to perform cleanup.[1] Simple variables could be used, although their names were limited to one letter and some letters were reserved for special purposes, of which some are the precursors of the environment variables found in all Unix systems from Version 7 onward.

For example, The $s variable was the ancestor of $HOME, used to avoid hard-coding pathnames. The $p variable was the ancestor of $PATH, which let users search for commands in their own choice of directories. Unlike most of the UNIX systems of the time, the original PWB/UNIX computer center was shared by multiple programming groups who could not change the contents of /bin or /usr/bin, but wanted to create their own sets of shared commands. In addition, the shell's command-searching was enhanced to allow shell procedures to be invoked like binary commands, i.e., if the shell found a non-binary file marked executable, it would fork another shell instance to read that file as a shell script. Thus people could type command arguments rather than sh pathname/command arguments. All this behavior was packaged as the function pexec, which was the ancestor of execvp, to allow any program to invoke commands in the same way as the shell.

The $ character (sigil), used previously for identifying arguments to a shell script, became the marker for dereferencing a variable, and could be used to insert a variable's value into a string in double quotes. (In addition to later shells, this feature would also later appear in the Perl and PHP programming languages.)

Descendants

These features could not overcome the shortcomings of the Thompson shell, and so a new shell was written from scratch by Stephen Bourne. This Bourne shell was incompatible with the Thompson and PWB shells, but included equivalents of most of the PWB shell's features, but done from scratch, rather than incrementally, with much discussion among the various participants. In particular, Environment variables and related machinery were designed by Stephen Bourne, John Mashey, and Dennis Ritchie as a general mechanism to replace the earlier, more limited features. After the adoption of the Bourne shell as the standard shell in Version 7 Unix, use of the PWB shell was phased out, although for a while, there was an internal Bell Labs course called Bourne Shell Programming for Mashey Shell Programmers. (The C shell, developed before the public release of the Bourne shell, also inherited some of the features of the PWB shell.[citation needed])

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:

  • PWB/UNIX — (for Programmer s Workbench) was an early version of the Unix operating system.Prior to 1976 Unix development at AT T was done by a small group of researchers in the Bell Labs Computer Science Research Group (Department 1127). But as word of the… …   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

  • Thompson shell — Original author(s) Ken Thompson Initial release 1971 Operating system Unix License Unix shell The Thompson shell was the first Unix shel …   Wikipedia

  • Unix shell — A Unix shell, is a command line shell that provides the traditional user interface for the Unix operating system and for Unix like systems. Users direct the operation of the computer by entering command input as text for a command line… …   Wikipedia

  • Debian Almquist shell — Stable release 0.5.7 / July 8, 2011; 4 months ago (2011 07 08) Type POSIX compliant Unix shell License BSD license, GNU General Public License …   Wikipedia

  • perl Shell — Запрос «PSH» перенаправляется сюда; см. также другие значения. Perl Shell Операционная система Various Последняя версия 1.8.1 (20 июля 2007) Лицензия GNU General Public License и Artistic License Сайт …   Википедия

  • Remote Shell — rsh ( remote shell ) is a command line computer program which can execute shell commands as another user, and on another computer across a computer network. The remote system on which the rsh executes the command needs to be running the rshd… …   Wikipedia

  • List of Unix utilities — This is a list of UNIX utilities as specified by IEEE Std 1003.1 2008, which is part of the Single UNIX Specification (SUS). These utilities can be found on UNIX Operating systems and most UNIX like operating systems. List IEEE Std 1003.1 2008… …   Wikipedia

  • Environment variable — Environment variables are a set of dynamic named values that can affect the way running processes will behave on a computer. They can be said in some sense to create the operating environment in which a process runs. For example, an environment… …   Wikipedia

  • John Mashey — started work on UNIX at Bell Labs in 1973, and continuing to work there for 10 years. He was the principal maintainer of the PWB shell, more popularly known as the Mashey Shell . He moved to Silicon Valley in 1983 to join Convergent Technologies …   Wikipedia

Share the article and excerpts

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