==================================== Directions and preparing for Test #2 ==================================== -Ian! D. Allen - idallen@idallen.ca As mentioned on the course home page, your second term test is in your lecture period on Wednesday, March 9, 2005. The test is in two parts: one set of Multiple Choice and one script. Bring a soft pencil (and a very good eraser) for Part I of the test. Bring a pen or pencil for Part II of the test. The test is 110 minutes (two hours minus 10 minutes) long. Manage your time. The multiple-choice questions are worth 1/2 of the mark. The script writing question is worth 1/2 of the mark. One half of the mark means one-half of the time - 55 minutes for each half. ------ Part I - closed book multiple choice with Crib Sheet ------ Required: two soft pencils (pencil *ONLY*) and a good eraser The first part of the test is multiple choice questions, filled out in soft pencil on the usual computer-readable blue mark-sense "bubble" sheets using a soft pencil. Bring a spare pencil and a very good eraser. *) This part is closed book and closed computer, except that you may have with you a "crib sheet". A crib sheet is one single piece of paper (metric A4 or standard Letter size) filled with anything you want to put there. You may use both sides. 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 the entire course textbook onto the page, if you can read it. Magnifying glasses are permitted. *) 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 two. Prepare your own crib sheet. *) Put your name on your crib sheet. *) I want to measure what you know, not what you don't know. Answer all the questions you know, first. Don't waste time with questions about which you are unsure. Guess the answer or come back to them later. *) Concentrate on your own answers. There are different versions of the test in the room. Your answers will not match the people around you. That's okay. Relax. Breathe. *) Bring two soft pencils and a good eraser. You will have a full set of multiple-choice questions to answer on a mark-sense bubble sheet. Erase mistakes completely - the scanner machine is very sensitive. *) Put your full, unabbreviated name on the mark-sense bubble sheet. Use the exact name you gave the Registrar - that's the name the computer is looking for when it matches your name against its database. Use the exact name with which you are registered. Pay attention to the order of Last and First names. Spelling counts. Many sample M/C test questions and answers have been posted to the Notes page: Practice Test #2 Questions practiceTest2.txt practiceTest2.pdf practiceTest2.ps All the files contain the same material in a different randomized order. Each file has its own answer key at the end. All the course and lab material covered up to March 8 is open to questions, including any previous tests and practice tests. ------- Part II - closed book shell script writing with Crib Sheet ------- Required: Any pen or pencil. In the second part of the test you will write, closed book, on paper, a 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 (Part II), the format of the main part of the shell script you will prepare must look similar to this: # Step 1 date echo "hi there" # Step 2 who ls -l /etc/passwd Each step in the script must be preceded by a comment line that starts with '#' that contains 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. Scripts must start with a correct NET2003 script header that includes an interpreter line and lines to set the shell search path, the default permissions for newly created files, and an ASCII sort order. For full marks, follow the full ten-part format described in Notes file script_style.txt. Some script specifications allow you to omit some parts of the ten-part format; read the actual script directions carefully. See these Notes files for examples of the things you might be asked to do: unix_command_list.txt Basic Unix/Linux Command List practiceCommands_2.txt Practice Unix/Linux Questions #2 practiceCommands_3.txt Practice Unix/Linux Questions #3 script_practice1.txt Practice Script #1 Specifications script_practice1.sh.txt Sample solution to script_practice1.txt script_practice2.txt Practice Script #2 Specifications script_practice2answer.txt Two sample solutions to script_practice2.txt script_practice3.txt Practice Script #3 Specifications script_practice3answer.txt Script Practice #3 answer script_practice4.txt Practice Script #4 Specifications script_practice4answer.txt Script Practice #4 answer http_session.txt sample HTTP session using the "nc" command CGI_script.txt Building a CGI Script on Unix ... and all the exercises. You will not be required to *write* "while" or "for" loops on this test, though you may be asked to *read* and understand code that uses them.