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
All shell scripts for the KSH shell start with the first line:
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
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!"TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!
- 30 Cool Open Source Software I Discovered in 2013
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012
- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop