================================================= Directions and preparing for Test #4 (Final Exam) ================================================= -Ian! D. Allen - idallen@idallen.ca As mentioned on the course home page, your final test begins at 11h30 (11:30AM) on Monday, December 13, 2004 in lab room T114. The test is in three parts: one set of Multiple Choice and two scripts. 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. Bring your Knoppix CD for Part III of the test. The final test is 150 minutes (2 1/2 hours) long. Manage your time. The multiple-choice questions are worth 1/3 of the mark. The first script writing question is worth the 1/3 of the mark. The second script writing question is worth 1/3 of the mark. One third of the mark means one-third of the time - 50 minutes for each third. ------ 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 blue mark-sense "bubble" sheets. *) 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 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 test questions and answers have been posted to the Notes page: Practice Test #4 Questions practiceTest4.txt (text format) practiceTest4.ps (Postscript format) practiceTest4.pdf (Portable Document Format) All the files contain the same material in a different randomized order. Each file has its own answer key at the end. This is a Final Test - all the course material is open to questions, including all 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, closed computer, 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. *) 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. *) 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". -------- Part III - online, open book shell script writing -------- Required: Your working Knoppix CD. After you have finished and handed in Part I and Part II, you may use your notes, computer, and Internet (if available) for Part III of the test. You will be required to write a working, executable shell script using the VIM editor and using Unix commands from the list of commands you know. Follow the style given at the bottom of this file. Part III is online and fully open book, open note, open computer using your Knoppix CD: *** Remember to bring your Knoppix CD to the test. The test will be done online through remote login to my laptop computer in the test lab. You might not have access to the Course Linux Server if the Internet is not working on the day of the test. All the files in your account on the Course Linux Server will be copied to your account on my laptop machine at 7am on the day of the test: *** Files created or modified in your Course Linux Server account after 7am Dec 13 may not be copied to my laptop computer and may not be available during the test if the Internet is not working. A copy of all DAT2330 course notes will be available on the test machine in the usual place, under ~idallen/public_html/teaching/dat2330/04f/notes/ (This is where they have always been on the Course Linux Server as well.) The Internet will probably also be available; however, nothing is guaranteed. Know how to find the course notes under my account on the server, via the shell, in case the Internet and/or WWW are not working on the day of the test. Neither the Internet nor the course notes are required to do the script. ================================ Script Style and Rules for Tests ================================ For the shell script sections (Parts II and III), 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 DAT2330 script header that includes an interpreter line and lines to set the shell search path and the default permissions for newly created files. For full marks, follow the full nine-part format described in Notes file script_style.txt. (You may prepare a template for your script ahead of time, before the test begins.) Some script specifications allow you to omit some parts of the 9-part format; read the actual script directions carefully. You may find it useful to log in multiple times to the Test Server during the test, so that you can be doing several things at the same time in different windows. You can use multiple windows or you can use the tabbed multiple shell sessions available with the Knoppix terminal emulator program. 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_3.txt Practice Unix/Linux Questions #3 labpractice1.txt Shell programming practice - Weather scripts labpractice2.txt C Language and Makefile practice - Tetris game script_practice1.txt Practice Script #1 Specifications script_practice2.txt Practice Script #2 Specifications script_practice2answer.txt Two sample solutions to script_practice2.txt CGI_script.txt Building a CGI Script on Unix ... and all the exercises. The shell "while" loop will not be covered on this test.