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
- Command history - Yes
- Line editing - Yes
- File name completion - Yes
- Alias command - Yes
- Restricted shells - Yes
- Job control - Yes
#!/usr/bin/ksh
All shell scripts for the KSH shell start with the first line:
#!/usr/bin/kshThis 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
Sample Output:
/usr/bin/ksh
Shebangs specify absolute paths to system executables; this can cause problems on systems which have non-standard file system layouts. Even when systems have fairly standard paths, it is quite possible for variants of the same operating system to have different locations for the desired interpreter. This can be fixed by making a script portable with #!/usr/bin/env as a shebang:
#!/usr/bin/env ksh echo "Hello World!"
Featured Articles:
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- My 10 UNIX Command Line Mistakes
- Linux: 20 Iptables Examples For New SysAdmins

- 25 PHP Security Best Practices For Sys Admins
- The Novice Guide To Buying A Linux Laptop
- 10 Greatest Open Source Software Of 2009
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- Top 20 OpenSSH Server Best Security Practices
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Linux Video Editor Software
Facebook it - Tweet it - Print it -

