Shell: difference sh, bash, csh, tcsh like the shell (rpm)

Reprinted from: http: //zhidao.baidu.com/question/493376840.html,

                http://blog.sina.com.cn/s/blog_71261a2d0100wmbj.html

Thank you!

 

1.Shell script has those types such as .csh. Py .sh scripts, what difference

Write a shell script usually have to use what the interpreter in the first line to explain the script that is written:! # / Bin / bash this form, meaning that tells the system to use the / bin / bash interpreter to explain this the following statements. .sh shell script is generally used as a suffix, as a floor, said extension at Linux and of no particular significance, but it easy to distinguish between humans, as long as the first line of your script are #! / bin / bash or other explanations, such as #! / bin / csh, the system will use the specified interpreter when executing the script to explain.

.csh probably used to distinguish, this script uses csh shell interpreter to explain this. .sh used to distinguish, using bash or sh script interpreter to interpret. .py is to use python to explain.

Difference 2.sh, bash, csh, tcsh and other shell of

Bourne Shell (i.e. sh) shell UNIX is initially used, flat and can be used on each UNIX. Bourne Shell very good at shell programming convenience, but in the interaction with the user for easy handling was not as good as several other shell. LinuxOS default is the Bourne Again Shell, which is an extension of the Bourne Shell, referred to bash, is fully compatible with the Bourne Shell, and increase the basis of the Bourne Shell, enhancing many features. We can provide command completion, command editing, and command history and other functions. It also contains a lot of C Shell and Korn Shell are advantages, there is a flexible and powerful editing interface, while very friendly user interface
C Shell is a more suitable than a variant of the Bourne Shell Shell, C language and its syntax is similar. Linux provides Tcsh prefer to use C Shell people. Tcsh is an extended version of the C Shell. Tcsh including command-line editor, programmable word completion, spelling correction, command history substitution, job control, and similar C language syntax, and he not only Bash Shell prompt compatible, but also provide more prompt parameters than Bash Shell.
Korn Shell set of advantages and Bourne Shell C Shell and Bourne Shell and fully compatible. Linux system provides pdksh (ksh extension), which supports character control, you can hang on the command line, background, wake-up or terminate the program.

Guess you like

Origin www.cnblogs.com/lh03061238/p/11106707.html