----------------------------------------------------- Week 8 Notes for DAT2330 - Ian Allen - idallen@ncf.ca ----------------------------------------------------- Remember - knowing how to find out an answer is more important than memorizing the answer. Learn to fish! RTFM! (Read The Fine Manual) ------ Review ------ In Week 7 (see week07notes.txt) you read the first part of Chapter 10 using the Reading/Study guides. You reviewed the updated vi_basics.txt file. You wrote a simple shell script. You wrote the second midterm test. You read several files under the Notes button on the course home page: vi_basics.txt, shell_script_execution.txt, midterm2_topics.txt, chapter10guide.txt ------------------ This Week (Week 8) ------------------ Pick up your midterm question sheet from your instructor. If I can get a mobile data projector, I will review the midterm test questions in the Labs this week. (If not, I will do the review in class.) Preparation for Exercise #5: 1. Read the file startup_files.txt (under Notes) and create the correct start-up .profile and .bashrc files on ACADUNIX. (Make sure you start up the bash shell in your .profile file.) Show these two files to your instructor. 2. Create a bash alias that changes "vi" to "vim" on ACADUNIX. Save it in your .bashrc. Log out; log in. Show your instructor. 3. Create a .vimrc file using the example given under "Setting VIM Options - Getting Help" in the vi_basics.txt file. Show your instructor. 4. Create a shell script that echoes one line of text to standard output and a second line of text to standard error (p.310). Demonstrate this to your instructor. (The script must start with the correct #! line given in the chapter10guide.txt notes.) 5. Know how to redirect both the standard output and standard error output of any command into a file or into a pipe (p.309). Use your script from #4 as the command and show your instructor. 6. Locate the copy of the course notes directory stored under ~alleni on ACADUNIX (~alleni/course/dat2330/03w/notes/). Use a command to find all lines that contain the word "TERM" (upper-case) in all files with names ending in ".txt" or ".html". Show your instructor. Watch for Exercise #5 in the Announcements this week. Other useful Notes (under the Notes buttons on the course home page): vi_basics.txt shell_script_execution.txt startup_files.txt chapter10guide.txt