CSCI-E26 | Assignment 0 | Due Sunday September 7 at 11:59PM |
This is a short assignment. You will submit one C program, one shell script and one pipeline. You will also submit three self-assessment programs.
mkdir 26-hw0 cd 26-hw0
PART ZERO Do at least three of the exercises on the self-assessment problem sheet. If you already submitted these before the class began, please submit copies again. Write the programs in any language you like. Submit your solutions for comments on your programming accuracy and style. If you find these difficult, then write to us right away to discuss if you are prepared for E26. You must do at least one of the last two problems.
PART ONE
to the shell.
to the shell. If you get syntax errors from the compiler, you must have made a typo. Fix it in an editor, then try again. If there are a lot of syntax errors, fix the first one and recompile. Some errors can confuse the compiler enough that it thinks the rest of your code is all wrong.
mv a.out reverseto the shell. You can run the renamed program by typing:
./reverse
PART TWO Experiment with Unix tools to analyze the MBTA Commuter Rail schedule data file by doing:
ln -s ~dce-lib113/sched.errs sched
This version of the file contains several errors. These are not
factual errors such as incorrect arrival time. Instead they are
data entry errors such as incorrect tag names or bad data format.
See how many errors you can find in this file. Create a plain text
file called errors that lists all the errors you find.
Also in the errors files, describe what tools, procedures, and/or
commands you used to find the errors.
PART THREE Write a shell script called busiest-hour that contains one pipeline to find which hour of the day has the most train stop events on a given day: m-f, sa, or su. The script should take an argument of m-f, sa, or su and print out the hour of the day which contains the largest number of records in the sched file and the number of records for that hour.
SUBMIT YOUR WORK To submit your work, login to your e26 account, cd into the 26-hw0 directory and type:
~dce-lib113/handin hw0