==================================== Directions and preparing for Test #2 ==================================== -Ian! D. Allen - idallen@idallen.ca As mentioned on the course home page, your first test is in your lecture period on Tuesday, March 7, 2006. The test takes the full class period (110 minutes) and ends at 11h50. The test is closed book, except that you may have with you a "crib sheet". A crib sheet is one side (one face) of one single piece of paper (metric A4 or standard Letter size) filled with anything you want to put there. You may hand write the paper or you may machine print it with tiny letters - you choose. You can put text or pictures or programs or anything you want there. You can copy all the course notes onto the page, if you can read it. Magnifying glasses are permitted. One side (face) only. You must prepare your own crib sheet. You will submit your crib sheet at the end of the test. People who have copied crib sheets from other people will have their marks divided by the number of copies. Prepare your own crib sheet. Put your name on your crib sheet. Bring two sharp soft pencils (and a very good eraser) for the test. Part of the test is a set of multiple choice questions, filled out on blue computer mark-sense "bubble" sheets using a soft pencil. Bring a spare pencil and a very good eraser. The scanner that reads the sheets is very sensitive - you must erase mistakes completely. You must use your full, unabbreviated name on the mark-sense sheet. Use the name that you have on file with the College registrar. Do not use abbreviations unless you have that abbreviation on file as your official name. Use your full, unabbreviated name on the sheet. In the course notes under the new heading "Tests and Exams (with Answers)" you will find many multiple-choice questions (with answers) similar to those I will be using on the test: Practice Test #2 Questions practiceTest2.txt (text format) practiceTest2.ps (Postscript format) practiceTest2.pdf (Portable Document Format) Practice Test #3 Questions practiceTest3.txt (text format) practiceTest3.ps (Postscript format) practiceTest3.pdf (Portable Document Format) All three practiceTest2 files contain the same questions in the same order. All three practiceTest3 files contain the same questions in the same order. Choose the format that suits you. The PDF or PostScript files print best. Each practice test file has the answer key at the end. Test format summary: Full class period (ending at 11h50). Some multiple-choice questions; some script questions; some written questions. Closed book, except for a one-sided (one face) single personal "crib sheet". What to study ------------- All course and textbook content up to and including Exercise #7, with an emphasis on content covered since the last test. ------- Part II - closed book shell script writing with Crib Sheet ------- Required: Any pen or pencil. As part of the second part of the test you will write, closed book, on paper, a small shell script. You may use the same Crib Sheet as you used in Part I. You write on paper only. *) Start writing your script *only* on the right hand pages in your test booklets. Put only two or three steps on each page and leave *lots* of white space above and below for corrections. Major corrections can be written on the left hand pages and inserted (using drawn arrows) if you run out of space on the right page. Start on the right; leave lots of space above and below each step; add code on the left had pages only if you need to. Leave lots of space! *) Don't waste time erasing large chunks of your script. Cross it out and start over if you have to. Use erasing only to handle minor corrections. Don't erase entire steps - cross them out and just rewrite them. Your script has to be readable; but, it doesn't have to be beautiful. Crossing out is usually faster and cleaner than erasing. You can have as much paper as you want. *) Even though you are using paper, you are still writing an executable script. Every line you put on the paper must be either a comment or a valid shell script command line. If you want to write notes to me or to yourself on the script pages, use proper shell comments. I expect every line on the paper to be valid in a shell script. *) Unix is case-sensitive. Don't write upper-case letters unless you mean to use upper-case letters. There is no such command as "DATE". ================================ Script Style and Rules for Tests ================================ For the shell script section i Part II, the format of the main part of the shell script you will prepare must look similar to this: # Step 2 date echo "hi there" # Step 3 who ls -l /etc/passwd Each step in the script must be preceded by a comment line that starts with '#' that contains only the step number (only the step number!), as you see above. These are the *only* comment lines you need in front of each step. After each single step-number comment line come the shell commands that you use to answer the questions for that step. Precede each step by a single comment line containing the step number.