PWB shell
Page Module:Message box/ambox.css has no content.
This article needs additional citations for verification. (December 2018) |
Page Module:Infobox/styles.css has no content.
| PWB shell | |
|---|---|
| [[Programmer|Original authorTemplate:Pluralize from text]] | John Mashey |
| [[Programmer|DeveloperTemplate:Pluralize from text]] | AT&T Bell Laboratories |
| Engine | Page Template:Plainlist/styles.css has no content.Template:EditAtWikidata |
| Operating system | Unix |
| Available in | English |
| Type | Unix shell |
| Website | Script error: No such module "WikidataIB". |
| Repository | Page Template:Plainlist/styles.css has no content.
|
Script error: No such module "Check for conflicting parameters".
The PWB shell (also known as the Mashey shell) was a Unix shell.[1]
History
The PWB shell was a modified (and generally constrained to be upward-compatible) version of the Thompson shell with additional features to increase usability for programming. It was maintained by John Mashey and various others (Dick Haight, Alan Glasser).[1][2][3]
PWB/UNIX started with Research Unix 4th Edition in mid-October 1973, and was frequently updated over the next few years, as the PWB department tracked Research Unix changes and added a few features. The PWB shell was released in mid-1975,[4] and remained available through Version 6 Unix-based PWB/UNIX.[5] In Version 7 Unix (1979), the PWB shell was superseded by the Bourne shell.[6]
Notable features
Several features were introduced in the PWB shell that remain in many later shells. The Page Template:Mono/styles.css has no content.if and Page Template:Mono/styles.css has no content.goto commands were made internal to the shell, and extended to allow Page Template:Mono/styles.css has no content.if-Page Template:Mono/styles.css has no content.then-Page Template:Mono/styles.css has no content.else-Page Template:Mono/styles.css has no content.endif, and Page Template:Mono/styles.css has no content.switch and Page Template:Mono/styles.css has no content.while constructs were introduced, as well as Page Template:Mono/styles.css has no content.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 Page Template:Mono/styles.css has no content.$s variable is the ancestor of Page Template:Mono/styles.css has no content.$HOME, used to avoid hard-coding pathnames. The Page Template:Mono/styles.css has no content.$p variable is the ancestor of Page Template:Mono/styles.css has no content.$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 Page Template:Kbd/styles.css has no content.command arguments rather than Page Template:Kbd/styles.css has no content.sh pathname/command arguments. All this behavior was packaged as the function Page Template:Mono/styles.css has no content.pexec, which is the ancestor of Page Template:Mono/styles.css has no content.execvp, to allow any program to invoke commands in the same way as the shell.
The Template:Char character, 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
References
Page Template:Reflist/styles.css has no content.
- ^ a b c Page Module:Citation/CS1/styles.css has no content.Mashey, John R. (1976-10-13). "Using a Command Language as a High-Level Programming Language". San Francisco, California, USA: Proceedings of the 2nd International Conference on Software Engineering. pp. 169–176. Archived from the original on 12 April 2020. Retrieved 12 April 2020.
In addition to these variables [$n, $p, $r, $s, and $t], the following is provided: $$ contains a 5-digit number that is the unique process number of the current shell. In some circumstances, it is necessary to know the number of a process, in order to kill it, for example. However, its most common use to date has been that of generating unique names for temporary files.
- ^ Page Module:Citation/CS1/styles.css has no content.Likic, Vladimir (28 September 2018). "Understanding Bash: Elements of Programming". Linux Journal. Archived from the original on 2018-12-21. Retrieved 2018-12-31.
The original Thompson shell, the Mashey shell and the Bourne shell were all called sh, and they overlapped or replaced one another in the years 1970–1976 as they were refined and gained additional capabilities. ... The Thompson shell had no programming capabilities. This changed with the development of the Mashey shell (and later the Bourne shell).
- ^ Page Module:Citation/CS1/styles.css has no content.Wiles, Jack (13 October 2011). TechnoSecurity's Guide to E-Discovery and Digital Forensics: A Comprehensive Handbook. Elsevier. ISBN 9780080558813. Retrieved 31 December 2018 – via Google Books.
- ^ Page Module:Citation/CS1/styles.css has no content.Mashey, John R. (27 January 1999) [1986]. Toomey, Warren (ed.). "Re: Shell history, true facts, but long | Newsgroups: net.unix-wizards". Archived from the original on 2016-10-06. Retrieved 2018-12-31.
The "PWB Shell" first appeared in mid-1975. It derived from a set of requirements and suggestions from me in early 1975 in trying to do serious shell programming. In mid-1975, the shell acquired variables, including 3 that were derived from per-process data. This is where the idea of more generalised path- searching came in.
- ^ Page Module:Citation/CS1/styles.css has no content.Chorafas, Dimitris N. (1986). Which Unix? : AT&T, IBM, and other standard bearers. McGraw-Hill. ISBN 9780070108790. Archived from the original on 2018-12-31. Retrieved 2018-12-31.
- ^ Page Module:Citation/CS1/styles.css has no content.Iftekher, Mohammad Forhad (10 November 2015). "Evolution Of Unix / Linux Shells - Unixmen". Unixmen.com. Archived from the original on 21 July 2019. Retrieved 31 December 2018.
External links
- The Traditional Bourne Shell Family: History and Development (Sven Mascheck)
- Manual page for the PWB shell, 31 May 1977
- Article by Mashey on the PWB shell's development and influence
- Using a Command Language as a High-Level Programming Language
Lua error in package.lua at line 80: module 'Module:Navbox/configuration' not found.