COP 3344 Assignment 3

Due on Tuesday, March 16, at class time.

Write a shell script that implements a report writer. The script file should be called "report" and should be invocable as

sh report
from the command line. The script will assume 3 input files -- called "products", "sales", "associates" -- as described below:
In your script you may use common Linux commands: make sure that your script runs fine on the Linux machine in the JCCL.

File Specifications (click on the file name to get an example of the file):

products:     has the following fields, the field separator is ":"
sales:    has the following fields, the field separator is "," associates:    has the following fields, the field separator is "/"

The script should compute the sale amounts per sales in the month of February, and print them in a list ranked according to the sales amount. Your script should invoke Linux commands on the above files to produce a report on standard output. Here is an example of the script invocation:


$ sh report
Marine Parts R US
Sales Associates Ranking
February 2004

Name Position Sale Amount
======================================================
John Doe Clerk 124.00
Susan Worker Manager 120.00
Fast Buck Stock Boy 92.00
Susan Worker Manager 12.00


$



Turning in Your Assignment:

This assignment is worth 30 points. The total score for all assignments is 100 points.