Project 3
1730sh – A Unix Shell
DUE TUE 2015-12-08 @ 11:55 PM
CSCI 1730 – Fall 2015
Project Description
For this project, you are going to implement a Unix shell (similar to bash) in C++ that supports background/foreground job control, pipelining, and IO redirection. Your code will make use of low-level system calls such as fork, exec, pipe, and related functions. You are NOT allowed to use the system, popen, and pclose system calls or functions.
Functional Requirements
Here you will find detailed information about the functional requirements for your shell.
• Prompt (20 points):
Your shell should read input from the prompt and divide it into words and operators, employing quoting rules (see below) to define the meaning of each character of input. Then these words and operators are translated into commands and other constructs, which return an exit status available for inspection or processing.
1730sh:~/cs1730/p3/$ cat filename
Using double quotes, the literal value of all characters enclosed is preserved, except for the backslash character. The backslash retains its meaning only when followed by another backslash or newline. Within double quotes, backslashes are removed from the input stream when followed by a double quote character. In other words, a double quote may be quoted within double quotes by preceding it with a backslash. The following example would have argc == 2:
1730sh:~/cs1730/p3/$ echo “my awesome” shell”””””