An early version of this page was submitted to PLoP96, see http://www.cs.wustl.edu/~schmidt/PLoP-96/shell.ps.gz for the paper.
Shell has emerged as a family of programming languages for the UNIX Operating System in the same sense that JobControlLanguage emerged as a programming language for mainframe job control in the 1960s. It is a family of languages because we find variant syntaxes and capabilities in the Bourne shell, the Korn shell, the C shell, and others. Most of the patterns described here apply equally well to all these variants.
These patterns do not form a full pattern language nor are they a comprehensive collection of patterns for the "architecture" of a Shell program. They cover frequent Shell programming problems that often are resolved only with expert insight.
A process mode that allows a process, started by one user, to run under the auspices and permissions of another user. SetUID permissions appear in the program file's mode.
A Shell running in a process that is a child process of some parent process, also running a shell, often arranged so the two Shells can communicate through a pipe.
StandardOutput is an abstract resource used by programs to print results where they will most likely be read; for an interactive user, this is the user terminal; for a batch job, it would correspond to a line printer or file. It is also called stdout. Other resources include StandardError? (stderr), the standard resource for error output, usually tied to StandardError?, and StandardInput? (stdin), the standard resource for user input (usually the keyboard, but it can be a file).
A program that is usually not interactive and that usually runs for a long time.
For example, gtty daemons are long-lived processes
that wait for users to log in on a line.
The Pattern Intents