Briefly describe the Shell’s responsibilities
The shell provides an interface through which the user gives input and the programs are executed based upon that. The responsibilities of a Shell are:
- Program execution: The shell is responsible for the execution of programs that is requested.
- Variable and file name substitution: The shell allows us to assign values to variables. When a variable is specified on the command line, preceded by a dollar sign, the value that is assigned to that variable at that point is substituted by the shell.
- I/O redirection: The shell is responsible for taking care of input and output redirection on the command line.
- Pipeline hookup: The shell scans the command line for pipe character. If it finds such characters, it connects the standard output from the command preceding the | to the standard input of the one following the |. It then initiates execution of both programs.
- Environmental control: The shell allows us to customize our environment. Environment includes home directory, the list of directories that is searched when a program is requested to be executed and the characters that is prompted by the shell when the command is typed.
- Interpreted programming language: The shell has its own built in programming language. The shell analyzes each statement in the language one line at a time and then executes it.