Tools / Shell Scripting Interview Questions
What are the different types of shells?
Shells are divided into two categories:
Bourne shell: The $ character is the default prompt when using a Bourne-type shell.
C shell: The % character is the default prompt.
There 2 sub categories of Bourne shell:
Bourne Again shell (BASH): Bash or Bourne Again Shell is the similar shell to Bourne or .sh in Unix. Bash shell was developed by the Freeware Software and it is written and licensed under the GNU organization. It's free and open-source. It is an SH-compatible shell, with improved programming and interactive features over SH. Some useful features of Bash shell are tab completion and setting a prompt to display the current directory.
Korn shell (KSH): Korn Shell or KSH was developed by a person named David Korn, which attempts to integrate the features of other shells like C shell, Bourne Shell, etc. It has associative arrays and handles the loop syntax better than Bash. It is basically an improved version of Bourne shell. It provides much better performance while dealing with execution of scripts and commands.
The C-Shell is subdivided into the following categories:
C shell (CSH): CSH is almost like C itself since it uses the shell syntax of the C programming language. In most cases, a command is executed either interactively from a terminal keyboard or from a file.
TENEX/TOPS C shell (TCSH): Tcsh is an enhanced version of the csh. It behaves exactly like csh but includes some additional utilities such as command line editing and filename/command completion. Tcsh is a great shell for those who are lazy with typing and/or have trouble remembering Unix commands.
More Related questions...