Previous Section  < Day Day Up >  Next Section

A.4. pdksh

pdksh (Public Domain Korn shell) is a version of the Korn shell that is a free alternative to bash. pdksh is available as source code in various places on the Internet, including the USENET newsgroup comp.sources.unix, and the pdksh home page http://www.cs.mun.ca/~michael/pdksh/ of the current maintainer, Michael Rendell.

pdksh was originally written by Eric Gisin, who based it on Charles Forsyth's public domain Version 7 Bourne shell. It has all Bourne shell features plus some of the POSIX extensions and a few features of its own.

pdksh's additional features include user-definable tilde notation, in which you can set up ~ as an abbreviation for anything, not just usernames.

Otherwise, pdksh lacks a few features of the official Korn version and bash. In particular, it lacks the following bash features:

  • The built-in variable PS4

  • The advanced I/O redirectors >| and <>

  • The options errexit, noclobber, and privileged

One important advantage that pdksh has over bash is that the executable is only about a third the size and it runs considerably faster. Weighed against this is that it is less POSIX-compliant, has had numerous people add code to it (so it hasn't been as strongly controlled as bash), and isn't as polished a product as bash (for example, the documentation isn't anywhere near as detailed or complete).

However, pdksh is a worthwhile alternative for those who want something other than bash and can't obtain the Korn shell.

    Previous Section  < Day Day Up >  Next Section