ICS 52: Systematic Software Construction
Winter 1997
Professors: Taylor and
Rosenblum
TAs: Liu,
Iyer, and Klashner
Assignment 1: Unix
Issued: Tuesday, 7 January 1997
Due: Tuesday, 14 January 1997
(Last modified Mon Jan 6, 1997)
Summary
The purpose of this assignment is to help you gain familiarity with the Unix operating system and provide the basic tools you will need to program in Ada. You will execute a number of basic Unix commands, edit a file, and learn how to send and receive email. You will turn in a printout showing the work that you did. After completing this assignment successfully, you will be able to start using your Unix account to write Ada 95 programs and edit documents for your class project.
Detailed Instructions for Assignment
Part1
Failure to follow these instructions will result in no credit for the assignment. Use your own Unix account to do the following activities in the order shown. Hint: You may want to practice the assignment a few times before creating the ``official'' final output. Make sure to run script command on a new or empty file each time you practice. Use the man command to get detailed information on the commands. It is suggested that you go through the printed Unix materials from the OAC or online.
- Start the script command to capture your activity.
- Create a directory called ics52 in the home directory of your account.
- Move into the ics52 directory.
- Use the pwd command to show your location.
- Use vi to edit a new file called assignment1.txt, type the following text into the file as it appears below
- your name as it appears on the roster, the last 4 digits of your student ID, your major (and minor), a reason for taking this class, and any programming experience you may have. For example:
Vallenkongic, Peter P.
1234
major: ICS
minor: Horticulture
This class is a necessary building block in my career development.
Pascal, Visual Basic, FORTRAN, and C.
- Exit the editor after saving the file.
- Produce a directory listing showing the contents of your current working directory using ls -tl.
- Copy the contents of file assignment1.txt to a new file called copy1.txt.
- Produce a directory listing showing the contents of your current working directory using ls -tl.
- Delete the file assignment1.txt.
- Produce a directory listing showing the contents of your current working directory using ls -tl.
- Rename the file copy1.txt to assignment1.txt.
- Produce a directory listing showing the contents of your current working directory using ls -tl.
- Send the file assignment1.txt to one of the printers.
- Delete the file assignment1.txt.
- Produce a directory listing showing the contents of your current working directory.
- Exit the script command.
- Send the file that was created by the script command to account klashner@ics.uci.edu
with the subject heading ICS52/email_A (no spaces). For documentation purposes, cc: yourself in case of a system error.
Part2
- Start the script command again.
- Move into the ics52 directory.
- Modules allow you to run various tools such as those found in the Ada tool set. You can use the module load gnat to add Ada programming functionality for Assignment 2.
- Use the more command to display your shell file from the ics52 directory (only the first page is required, so use CTRL-C to cease output). Example:
- your_account_name@clyde% more ~your_account_name/.cshrc
- --More--(37%) CTRL-C
- You can use vi to edit the .cshrc and add gnat to the file so that everytime you log in the module is loaded. The addition is near the top of the file and should be apparent.
- Send the file that was created by the second script command to account klashner@ics.uci.edu
with the subject heading ICS52/email_B (no spaces). For documentation purposes, cc: yourself in case of a system error.
Department of Information and Computer
Science,
University of California, Irvine CA 92697-3425