IST 108-01L / Operating Systems: UNIX / Spring 2003

Assignments

Note that all assignments are due promptly at the start of class in order to receive full credit.  Late assignments will be penalized.

 
Due date Assignment
20 January
  1. Send me an e-mail message.  Include a few sentences describing what experience, if any, you have had with UNIX and with any other operating systems.  Also, what are your goals for this course?  (I will be constructing a class mailing list from your messages.  You must send me a message using your NVCC e-mail account;  you are welcome to send me an additional message using another e-mail account.
  2. Read chapters 1 and 2 of the textbook;  work through all the examples and questions in the text.
27 January

Read chapter 3 of the textbook, working through all the examples.

3 February

Read chapter 4 of the textbook, working through all the examples.

10 February
Read chapters 5 and 6 of the textbook, working through all the examples.
24 February

No class on Presidents Day, 17 February.

  1. Read chapters 7 and 8 of the textbook, working through all the examples.
  2. Do scripting project #1, described below.  You may turn in hardcopy to me in class or send via e-mail -- either way, it must be received by 7 PM to earn full credit.  Leave the scripts on-line in your home directory so that I can check them there.
3 March
  1. Read chapters 9 and 10 of the textbook, working through all the examples.
  2. Using a text editor or word processor, create a summary sheet of the material we've covered so far this semester.  One section should cover all the UNIX commands with their options;  another section should cover instructions to the shell, such as command history, piping, and I/O redirection.  You may turn in hardcopy to me in class or send via e-mail -- either way, it must be received by 7 PM to earn full credit.  
10 March

Spring break, no class -- enjoy!

17 March
  1. Prepare for mid-term exam.  The exam will take the first half of the evening, with a normal class session during the second half.  Although it will be a closed-book exam, you will be allowed to use the summary sheet you created for homework.
  2. Read chapters 11 and 12 of the textbook, working through all the examples.
24 March

Read chapters 13 and 14 of the textbook, working through all the examples.

31 March

Read chapters 15 and 16 of the textbook, working through all the examples.

7 April
  1. Read chapters 17 and 18 of the textbook, working through all the examples.
  2. Begin working on scripting project #2, described below.  This assignment will be due on 14 April.
14 April
  1. Read chapters 19 and 20 of the textbook, working through all the examples.
  2. Finish scripting project #2, described below.  
21 April

We have now finished the text book -- but I strongly encourage you to continue reviewing sections that are hazy.  This week's reading assignments are all on-line, as noted below.

  1. UNIX Networking:  read Educator's Guide to School Networks, chapters 1, 2, 3, and 6. The heart of UNIX networking is TCP/IP, so study TCP/IP protocol suite; be sure to click the links to read both pages. Then study Internet services.  Finally, on unixsun (or another UNIX system), use the man command to read the on-line manual pages for telnet and ftp.
  2. System administration:  study Linux Systems Administration;  for each command described, be sure to click on the link to read the documentation for that command.  Then, read the on-line manual pages for passwd, du, df, init, syslogd, and syslog.conf. 
28 April
This week's reading assignments are all on-line, as noted below.

Software revision control:   read article on Source Code  Control System; be sure to read Objectives, Conceptual Overview, and Tutorial.  Then, on unixsun (or another UNIX system), use the man command to read the on-line manual pages for sccs and the sccs sub-commands listed in the "See Also" section at the end.

!! Extra credit !!
For extra credit, do optional scripting project #3, described below. 

5 May

Prepare for final examination.  Although the exam will not be "open book" in the usual sense of the term, you will be allowed to use the summary sheet you created as a homework assignment.

 


Scripting Projects

Project 1

  1. Write a script called ~/hw1-1, which performs the following functions:

    Demonstrate correct functioning of the script by issuing the following commands;  then copy your telnet session output and paste it into Notepad or Word for printing and submission.


  2. The last command shows the history of every login session for every user.  Write a script called ~/hw1-2, which performs the following functions:

    Run the script;  then copy your telnet session output and paste it into Notepad or Word for printing and submission.


Project 2

Examine the file  ~Tom/hw/hreport-data to determine its layout.  Write a script called ~/hreport, which performs the following functions:

  1. Accept exactly two arguments.  If the script is invoked with the wrong number of arguments, display an appropriate error message and exit.
  2. Read in the file specified as the first argument.  If the file does not exist, display an appropriate error message and exit. 
  3. If the value of the second argument is "name", display the last name, first name, and job position (in that order) for each record, sorted by last name.  If the value of the argument is "phone", display the phone number, first name, and last name (in that order), for each value, sorted by phone number.  If the argument has any other value, display an appropriate error message and exit.

If you find it necessary to create any temporary files, they should be created in the /tmp directory, and should be deleted at the end of the script.  

The script should include appropriate comments as documentation.

You should submit a listing of your session, including the following commands:
   $ cat hreport
   $ ./hreport
   $ ./hreport ~Tom/bad-file
   $ ./hreport ~Tom/hw/hreport-data name
   $ ./hreport ~Tom/hw/hreport-data phone


Project 3

Write a script to create a "keyword in context" report.  Details:
  1. Name the script kwic.
  2. The script should include useful, descriptive comments.
  3. The script should accept exactly one argument:  the name of a text file.
  4. The script should display appropriate error messages if the script is invoked with an incorrect number of arguments, or if the file specified as the argument does not exist.
  5. The script should pass different return codes to the calling process as follows:  0 = successful completion;  1 = incorrect number of arguments;  2 = specified filename does not exist.
  6. Your script should find each occurrence of each word.  Ignore case (for example, consider "Word" and "word" to be equivalent), and strip out punctuation marks.  For each occurrence, print a line consisting of the keyword (that is, the word itself), then the line number on which it occurred, and then the complete line.  If a word appears more than once in any line, it should only be listed once in your output.  The output should be sorted alphabetically by keyword, and then numerically by line number within word.

Running the script against the the first two lines of this project description would result in output similar to the following:

a: 1: Write a script to create a "keyword in context" list. Details:
call: 2: Call the script kwic.
context: 1: Write a script to create a "keyword in context" list. Details:
create: 1: Write a script to create a "keyword in context" list. Details:
details: 1: Write a script to create a "keyword in context" list. Details:
in: 1: Write a script to create a "keyword in context" list. Details:
keyword: 1: Write a script to create a "keyword in context" list. Details:
kwic: 2: Call the script kwic.
list: 1: Write a script to create a "keyword in context" list. Details:
script: 1: Write a script to create a "keyword in context" list. Details:
script: 2: Call the script kwic.
the: 2: Call the script kwic.
to: 1: Write a script to create a "keyword in context" list. Details:
write: 1: Write a script to create a "keyword in context" list. Details:


Last updated 26 Apr 2003