Skip to main content

Shall As A Command Processor


Shell As A Command Processor:

                  Whenever we log on to a Unix machine, we see a prompt. This prompt can be either $

and %. Infect a program is running every time we make a login to the system. This program is called as shell. Whenever we issue a command the shell acquires that information. Parses and rebuilds the command line and finally leaves the execution work to the kernel. The kernel handles all the hardware on behalf of these commands and all processes is the system. Every thing happens in the background keeping user ignorant of happening behind the scenes. The shell is generally in one of the three states namely waiting, sleeping and waking. The shell wakes up and perform the following.

(1)   It parse the command line and identifies each and every word in it and removes additional spaces if present.

(2)   Looks for special variables is the command line like $$ which generally begin with a $ symbol.

(3)   It then creates a simplified command line and passes it to the terminal for execution. The shell then gives to the waiting state until the command is executed and waits for its completion.

(4)   After the command is executed successful, the shell prompt reappears and shell returns to the waiting state waiting for the user to enter mew commands. This process can also be shown diagrammatically as:
Fig:(I).  Shall As A Command processor

Comments