Lab 5 - The Cow Shell
A mini command interpreter
Due: 4:50 PM, Friday, March 19, 2005


For this week's lab, you are to write a C program called the Cow Shell (cowsh), a mini command shell interpreter. cowsh is similar to familiar Unix shells such as the Bourne shell (sh) the Bourne-Again shell (bash), and C shell (csh, tcsh). You will learn about process creation, implementation of pipes, input/output redirection, background processes, signals, interrupt handling, and the use of some system calls.

This lab is considered a "team program" (groups of size 2 or 3 permitted) for honor code purposes. Collaboration within a group is, of course, unrestricted. You may discuss the program with members of other groups, but what you turn in must be your own group's work. Groups must be formed no later than 4:00 PM, Friday, March 12, 2005, and be confirmed by all group members by electronic mail to terescoj@cs.williams.edu. All group members will be assigned the same grade for the lab. There are many subtasks that can be carved off and assigned to group members, so everyone is encouraged to join a group.

Requirements

Like the familiar Unix shells, cowsh should issue a prompt (perhaps "cowsh#"), at which it reads commands from the user and executes them.

Your shell should interpret the following commands and provide the following functionality:

Notes

Submission and Evaluation

All necessary files should be submitted using turnin as a single "tar" file, lab5.tar. Include a Makefile to allow easy compilation of the Cow Shell program.

I will compile and test your shell programs on CSLab FreeBSD systems.

Your program will be graded based on a total of 40 points.