sh/bash/csh/Tcsh/ksh/pdksh等shell的区别

w

shell confusion..what is diff between bash, ksh, csh, tcsh..??  http://www.linuxquestions.org/questions/linux-newbie-8/shell-confusion-what-is-diff-between-bash-ksh-csh-tcsh-256625/

Code:
#! /bin/bash

when you write a bash script. You can execute this under tcsh or csh. The system recognizes this line and uses bash to execute the script.

Shell 教程 | 菜鸟教程  http://www.runoob.com/linux/linux-shell.html

#! 是一个约定的标记,它告诉系统这个脚本需要什么解释器来执行,即使用哪一种 Shell。

sh/bash/csh/Tcsh/ksh/pdksh等shell的区别

    • sh(全称 Bourne Shell): 是UNIX最初使用的 shell,而且在每种 UNIX 上都可以使用。
      Bourne Shell 在 shell 编程方便相当优秀,但在处理与用户的交互方便作得不如其他几种 shell。

    • bash(全称 Bourne Again Shell): LinuxOS 默认的,它是 Bourne Shell 的扩展。
      与 Bourne Shell 完全兼容,并且在 Bourne Shell 的基础上增加了很多特性。可以提供命令补全,命令编辑和命令历史等功能。它还包含了很多 C Shell 和 Korn Shell 中的优点,有灵活和强大的编辑接口,同时又很友好的用户界面。

    • csh(全称 C Shell): 是一种比 Bourne Shell更适合的变种 Shell,它的语法与 C 语言很相似。

    • Tcsh: 是 Linux 提供的 C Shell 的一个扩展版本。
      Tcsh 包括命令行编辑,可编程单词补全,拼写校正,历史命令替换,作业控制和类似 C 语言的语法,他不仅和 Bash Shell 提示符兼容,而且还提供比 Bash Shell 更多的提示符参数。

    • ksh (全称 Korn Shell): 集合了 C Shell 和 Bourne Shell 的优点并且和 Bourne Shell 完全兼容。

    • pdksh: 是 Linux 系统提供的 ksh 的扩展。
      pdksh 支持人物控制,可以在命令行上挂起,后台执行,唤醒或终止程序。