Korn Shell

The KornShell is a reimplementation of the BourneShell. It is downward compatible, but adds many features intented to simplify programming. Most of the features are part of PosixShell, too, and therefore are available on any PosixSystem.

The BashShell also implements most of the functionality.

The KornShell is part of any modern (commercial) Unix system, e.g. ["Solaris"], ["AIX"], ["HP-UX"]. An OpenSource version called PdKsh ("Public Domain Korn Shell") is available e.g. for ["Linux"].

The successor to the KornShell is KornShell93, which adds even more features. The source for KornShell93 was recently liberated, and some GNU/Linux distributions now offer it in addition to (or instead of) PdKsh.

        ((i=i+1))
        while ((i<10))
        do
            echo "$i"
            ((i=i+1))
        done

        lines=`echo \`wc -l < /etc/passwd\``

        lines=$(echo $(wc -l < /etc/passwd))

Other, smaller improvements over the BourneShell include

Most of the features of the KornShell are available in the BashShell, too. The following features are not found in the BashShell:

And everyone's favorite KornShell feature that's not in Bash: