📜  Shell 脚本 - Korn Shell 和 Bash shell 之间的区别

📅  最后修改于: 2022-05-13 01:57:31.305000             🧑  作者: Mango

Shell 脚本 - Korn Shell 和 Bash shell 之间的区别

Korn Shell: Korn Shell 或 KSH 是由一个叫 David Korn 的人开发的,它试图集成其他 shell 的特性,如 C shell、Bourne Shell 等。Korn Shell 允许开发人员在需要时生成和创建新的 shell 命令。 Korn shell 是早在一年前就开发出来的,因为它比 BASH shell 更老,资源更少,计算机用户范围有限。 Korn 有各种版本,例如 pdksh、mksh、ksh93 等等。 Korn shell 中有 print 命令可以在终端中打印消息,这比 Bash Shell 中的 echo 要好。

Bash Shell: Bash 或 Bourne Again Shell 与 Unix 中的 Bourne 或 .sh 相同。 Bash shell 由 Freeware Software Software 开发,它是在 GNU 组织下编写和许可的。这就是使 Bash shell 成为公共域 shell 的原因。 Bash shell 是免费和开源的,可供计算机用户使用。 Bash shell 的一些有用功能是选项卡完成和设置提示以显示当前目录。我们可以毫无问题地在 Bash Shell 中运行其他 shell 的语法。与其他具有大量资源和功能的 shell 相比,Bash Shell 是最近开发的 shell。

Korn Shell 和 Bash Shell 之间的区别表

Korn Shell

Bash Shell

The script extension of the KSH shell is .kshThe script extension of the Bash shell is .sh
The path of the Korn shell in the directory structure is /bin/ksh.The path of the Bash shell in the directory structure is /bin/sh.
Approximately the Binary size of the Korn Interpreter is somewhere 1.6 MB.Bash interpreter has a binary size of 1.1 MB.
Korn shell uses the print command to print the message in the terminal.Bash shell uses the echo command to print the message in the terminal.
Korn shell has better support to loop handling as compared to the Bash shell.Bash shell can also handle loops better but not to the mark as compared to Korn shell
The Korn shell is developed by David Korn and it’s older than the Bash shell.Bash shell is developed by Freeware Software Foundation and it is a newly created shell as compared to the Korn shell.
There is less number of users using the Korn shell and the community is also less as compared to the Bash shell.Bash shell consists of a large number of active users and has a large community.