PWB shell

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.

The $p variable is 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.

All this behavior was packaged as the function pexec, which is the ancestor of execvp, to allow any program to invoke commands in the same way as the shell.

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.