horizontal rule

 

CS 140U
ASSIGNMENT 6
120 POINTS

DUE announced in class

 

Problem: Write a simple, short, C-Shell script to mail an ordinary text file to a specific user if he/she is currently on the system. Assuming the name of the script file is mifon, here is how the script is supposed to be used:

%mifon user file_name

The following error conditions must be tested for, and they should force the script to terminate.

1) Number of arguments not equal to 2.
2) The user not currently logged in.
3) The file to be mailed does not exist.
4) The file to be mailed is a directory.
5) The file to be mailed is not readable.
6) The file to be mailed is not a text file.

Write your script with comments describing what the script does, how it is used, and who has written it.

Submit:

1)    E-mail your script file to user saggarwa.
2)    A hard copy of your script file.

Notes:

Test the script on your account and a non-existing account such as foo.

 

 

horizontal rule

Back to CS140U Homepage
This page was last modified January 07, 2008
wmorales@pcc.edu