Bash is very popular Linux and Unix shell used system administrators. Even most of the users do not know that they are using bash shell because of it is provided by default in the operating system. There are different shell types supported by Linux, Unix and BSD. Korn shell is another but less popular shell. In this post we will compare
kshand try to show differences and similarities between them.
Bash and Korn Shell Binaries
Bash shell binary or interpreter is located at the
/bin/bash . While bash interpreter binary size is 1.1 MB
Ksh shell binary or interpreter is located as
/bin/ksh. Korn shell binary is 1.6 MB.
As issuing same commands again and again not a practical way we generally prefer scripts. Both bash and ksh have scripting capabilities. While extension is not a must we can use them to identify easily.
Bash have script extension
Korn shell have script extension
Both of the shells provides programming features. Their syntax is similar to each other. Korn shell provides more features than bash because it is designed to be superior than programming rich shells like C Shell, TC shell, Bourne shell.
Bash have decent performance while running commands in the interactive shell or as a script.
Korn shell provides a little bit more performance for command execution and scripts.
As we can see from first part the size of the ksh binary is bigger than bash.
Bash provides rich feature set.
Korn shell provides rich feature set which exceeds the bash features but this may require more time to learn. Korn shell have