Explain shell and their types in Unix

Shell program in Unix

I shall is a program that sit on the kernel and acts as an agent or interface between the user and the kernel and hence the hardware full stop it is similar to the command.com in the MS dos environment. A shell is a command interpreter or a processor as soon as the system booted successfully the shell presents a command prompt (#,$,%) at which the user can type any Unix command. After accepting the command the shell generates the executable simple command lines by praising it , evaluating variables performed command substitution and identifies the path. This command line is passed on the kernel for execution.

There are many different types of shells available some of them are discussed here:

Bourne shell (SH) : this is a most common shell available in UNIX system and the first major shell to be developed. This shell is most used it has been named after the author Stephen bourne add AT&t Bell this shall is distributed as the standard cell on at most all Unix system.

C shell : BEL Joy this shall at UCB in 1987 as a part of bsd release it is called as sea shell because its syntax and usage is very similar to the C programming language unfortunately the shell is not available on all machines shell scripts written in the C shell are not compatible with the Bourne shell. One of the major disadvantage of the C shell over the Bourne shell is its compatibility to execute the process in the background.

Korn Shell (ksh) : this cell is developed by David korn at AT&t bells lab. It is built on bourne shell it is also incorporate contain features of the C shell. It is one of the widely used shell. It can run Bony shell script without any modifications.

Bourne again shell (bash) : date shall established by b. Fox and C Ramey ad free software foundation. contain LINUX operating system variants come with their shell as it is default shell.

Features of korn shell :

  1. Interactive exiting of command line
  2. Better function definitions
  3. Extensive pattern matching

Several features adopted from C shell are:

  1. Command history
  2. job control and their moving from background to foreground
  3. Alias from abbreviated command.
  4. Field sign used as short and for name of home directory

Features of c shell are as follows

  1. Input and output redirection.
  2. wildcard and meta characters for finding abbreviation
  3. Set of shell variables to customise your environment

C shell at the following new features:

  1. Integer arithmetic
  2. History mechanism allowing you to recall previous command
  3. Aliasing your abbreviation used frequently without the shell script
  4. More flexible from command substitution
  5. Job control
  6. A built set of operation based on c for writing shell programming.

You may like these posts