AT&T Bell Laboratories · Est. 1983 · IEEE POSIX 1003.2

Command & Programming Language

Designed by David G. Korn, ksh unites the interactive ergonomics of the C shell with the scripting rigor of the Bourne shell—evolving into a fast, extensible, high-level UNIX programming language.

1983 First shell with Emacs & vi inline editing
80% Adoption in Bell Labs computer center survey
POSIX Source standard for IEEE 1003.2
dgk@bell-labs: ~/ksh93
1982–83

ksh Born at Bell Labs

Combined Bourne shell scripting with C shell interactive features—and introduced emacs and vi inline editing.

1986

Multibyte & Global

First UNIX shell to offer transparent 8-bit and multibyte character set support.

1988

ksh88 & POSIX

Adopted by UNIX System V Release 4 and used as the basis for the IEEE POSIX 1003.2 shell standard.

1993

ksh93 Rewrite

Floating-point math, associative arrays, nameref, compound & discipline variables, and a C extension API.

2000+

Open Source

Open-sourced by AT&T and actively maintained today at github.com/ksh93/ksh.

What is the KornShell Language?

More than a command interpreter—an interactive environment and high-level scripting language built for speed and longevity.

Designed and developed by David G. Korn at AT&T Bell Laboratories, the KornShell is an interactive command language providing access to UNIX and many other operating systems, as well as a complete, high-level programming language for prototyping and building applications.

Where the Bourne shell (Steven Bourne, Bell Labs) excelled at scripting and the C shell (Bill Joy, UC Berkeley) pioneered interactive conveniences, ksh combines the best of both—while remaining upward-compatible with Bourne shell scripts so existing scripts run without modification.

With ksh93, KornShell gained the expressive power of dedicated scripting languages like awk, perl, and tcl, often running an order of magnitude faster than sh or csh thanks to built-in utilities and runtime-loadable commands.

Key Features of ksh93

Highlights from the KSH-93 Info Sheet and The New KornShell.

⌨

Inline Editing & History

Edit current or past commands using emacs or vi modes, complete filenames on the fly, rebind keys, and persist command history across sessions.

∑

Floating-Point & Base-64 Math

Double-precision floating-point arithmetic, integer bases 2 through 64, C-style operators and precedence, and C-style for ((i=0; i<n; i++)) loops.

{}

Arrays & Compound Variables

Indexed and string-keyed associative arrays, name references (nameref), active discipline functions, and structured compound variables.

⇄

Co-Processes & Extended I/O

Launch and communicate with background co-processes, target arbitrary file descriptors (read -u3), format with ANSI-C printf, and build interactive menus.

⚡

Dynamic Built-ins & Speed

Standard utilities run in-process without forking, and new built-in commands can be dynamically loaded at runtime via a clean C API.

🔍

Pattern Matching & Debugging

Extended regular-expression pattern matching, substring slicing, scoped local variables, DEBUG traps, and line-numbered execution traces.

Real Examples from The New KornShell

Classic scripts straight from the book by Morris Bolsky & David Korn—download the complete archive in examples.tar.

Page 80 — Reversing an array in-place using nameref and C-style arithmetic loops

References, Books & Classic Papers

The authoritative manuals, FAQ, and landmark publications on KornShell.

Essential Books

Landmark Papers

1996
The New KornShell — ksh93 David Korn, Charles Northrup, Jeffrey Korn · The Linux Journal, July 1996
1996
Tksh: A Tcl Library for KornShell Jeffrey Korn · Fourth Annual USENIX Tcl/Tk Workshop, July 1996
1994
ksh: An Extensible High Level Language David Korn · USENIX Very High Level Languages Symposium (VHLL), October 1994
David G. Korn

David G. Korn

David Korn earned his B.S. in mathematics from RPI (1965) and his Ph.D. in applied mathematics from NYU's Courant Institute (1969). After working on computer simulations of transonic airfoils, he joined Bell Laboratories in 1976 and was named a Bell Labs Fellow in 1984.

In addition to creating the KornShell, his work includes UWIN, the 3-D File System, and SFIO (Safe/Fast String/File I/O). He worked at AT&T Research and Google before retiring in 2018, and resides in New York City.

KornShell UWIN 3-D File System SFIO Bell Labs Fellow

Korn meets KoRn

When the creator of the KornShell crossed paths with the nu-metal band.