Related Shells

Contents:
The Bourne Shell
The IEEE 1003.2 POSIX Shell Standard
wksh
pdksh
bash
Workalikes on PC Platforms
The Future of the Korn Shell

The fragmentation of the UNIX marketplace has had its advantages and disadvantages. The advantages came mostly in the early days: lack of standardization and proliferation among technically savvy academics and professionals contributed to a healthy "free market" for UNIX software, in which several programs of the same type (e.g., shells, text editors, system administration tools) would often compete for popularity. The best programs would usually become the most widespread, while inferior software tended to fade away.

But often there was no single "best" program in a given category, so several would prevail. This led to the current situation, where multiplicity of similar software has led to confusion, lack of compatibility, and-most unfortunate of all-UNIX' inability to capture as big a share of the market as other operating platforms (MS-DOS, Microsoft Windows, Novell NetWare, etc.).

The "shell" category has probably suffered in this way more than any other type of software. As we said in the Preface and Korn Shell Basics, of this tutorial, several shells are currently available; the differences between them are often not all that great. We believe that the Korn shell is the best of the most widely used shells, but other shells certainly have their staunch adherents, so they aren't likely to fade into obscurity for a while.

Therefore we felt it necessary to include information on shells similar to the 1988 UNIX Korn shell. This Appendix summarizes the differences between the latter and the following:

We'll conclude this appendix with a look at the Korn shell's future: the next release's expected features, obsolescent features of the current shell, and other issues.

The Bourne Shell

The Korn shell is almost completely backward-compatible with the Bourne shell. The only significant feature of the latter that the Korn shell doesn't support is ^ (caret) as a synonym for the pipe (|) character. [1] This is an archaic feature that the Bourne shell includes for its own backward compatibility with earlier shells. No modern UNIX version has any shell code that uses ^ as a pipe.

[1] There are also a few differences in how the two shells react to certain extremely pathological input. Usually, the Korn shell processes correctly what causes the Bourne shell to "choke."

To describe the differences between the Bourne shell and the Korn shell, we'll go through each chapter of this tutorial and enumerate the features discussed in the chapter that the Bourne shell does not support. Although some versions of the Bourne shell exist that include a few Korn shell features, [2] we refer to the standard, Version 7 Bourne shell that has been around for many years.

[2] For example, the Bourne shell distributed with System V supports functions and a few other Korn shell features.