Difference Between Korn Shell (ksh) and Bash

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/difference-korn-shell-ksh-bash/
PINTEREST
PINTEREST
INSTAGRAM

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 bashand kshand try to show differences and similarities between them.

Binary

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.

Bash and Kornshell Binaries

Bash and Kornshell Binaries

Script Extension

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 .sh

Korn shell have script extension .ksh

Programming Features

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.

Performance

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ç

Features

As we can see from first part the size of the ksh binary is bigger than bash.

Bash provides rich feature set.

LEARN MORE  Linux Bash For Loop Range Examples

Korn shell provides rich feature set which exceeds the bash features but this may require more time to learn. Korn shell have printcommand which behaves better than bash echo .

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/difference-korn-shell-ksh-bash/
PINTEREST
PINTEREST
INSTAGRAM

You may also like...

Leave a Reply

Your email address will not be published.

Enjoy this blog? Please spread the word :)