155. What are the main responsibilities of a Unix Shell?
Some of the main responsibilities of a Unix Shell are as follows:
1. Program Execution: A shell is responsible for executing the commands and script files in Unix. User can either interactively enter the commands
in Command Line Interface called terminal or they can run a script file containing a program.
2. Environment Setup: A shell can define the environment for a user. We can set many environment variables in a shell and use the value of these
variables in our program.
3. Interpreter: A shell acts as an interpreter for our scripts. It has a built in programming language that can be used to implement the logic.
4. Pipeline: A shell also can hookup a pipeline of commands. When we run multiple commands separated by | pipe character, the shell takes the
output of a command and passes it to next one in the pipeline.
5. I/O Redirection: Shell is also responsible for taking input from command line interface (CLI) and sending the output back to CLI. We use >, <,
>> characters for this purpose.