September 5, 2012

What is UNIX / Linux Korn Shell?

Korn Shell is developed by David Korn at Bell Laboratories

It is upwardly compatible with most Bourne shell features.

It has interactive features like C Shell, but executes faster and has extended inline command editing capability.

The ksh93 version supports associative arrays and built-in floating point arithmetic.

Korn Shell Features

  1. Command history – Yes
  2. Line editing – Yes
  3. File name completion – Yes
  4. Alias command – Yes
  5. Restricted shells – Yes
  6. Job control – Yes

#!/usr/bin/ksh

All shell scripts for the KSH shell start with the first line:

#!/usr/bin/ksh

This is called a shebang, a hashbang, hashpling, or pound bang. The following is a KSH shell script file example:

#!/usr/bin/ksh
echo "Hello World!"

You can find ksh path using which command:
$ which ksh

Leave a Reply

Your email address will not be published. Required fields are marked *