Unix_Shell

Overview

A Unix shell is a command-line interpreter that provides a traditional user interface for the Unix operating system and for Unix-like systems. This shell can run in two modes: interactive and batch.

  • In the shell interactive mode, you start the shell program, which displays a prompt and the user of the shell types commands at the prompt. The shell program executes each of these commands and terminates when the user enters the exit command at the prompt.
  • In the shell batch mode, you start the shell by calling your shell program and specifying a batch file to execute the commands included in it. This batch file contains the list of commands (on separate lines) that the user wants to execute.

Get started:

First you need to compile the program, open the terminal in the shell location and type:

make

Then you will be able to run the shell by typing:

./shell

And in case of batch mode:

./shell batch_file_name

Then you can use the shell with the same commands of Unix terminal.

Sample run:

sample_1

sample_2

sample_3

sample_4