The final covers mostly the last part of the class (after awk). If a UNIX command gets an error, what's its return value? (non-zero) If it succeeds, what's the return value? (zero) Know how to redirect standard output and standard error. Know what happens with && and || command1 && command2 # command2 is done only if command1 succeeds command1 || command2 # command2 is done only if command1 fails Know how to start a job in the background, and how to kill it once it's started. Know how pushd and popd work. I wrote a tutorial for this at http://evc-cit.info/cit050/pushd.html What does $0 refer to in a shell script? $1, $2, $3, etc? Know how to create and set a variable. Example: create a variable named printer and set it to HP4250 printer="HP4250" Know how to create and initialize an array; know how to make a variable that must be an integer, and how to make one that must be read-only. In this sequence: date > output.txt pwd > output.txt The second command will overwrite the output from the first command. How do you set an option so that the shell won't overwrite the file when you do the second command? How do you read keyboard input into a shell variable? echo "What is your name?" read yourName echo "Hello, $yourName" How do you put multiple commands onto one line in a shell script? How do you continue a command from one line to the next in a shell script? Know how to use the history operation ! to bring back previous commands. Since this is an open-book test, knowing that the BASH environment variables are listed on pp. 814-818 could be very useful. Give two ways to set the shell variable myDir to the output of the pwd command. myDir=`pwd` myDir=$(pwd) Know how to echo (or use) the value of a variable or an element in an array. If you have an array named "data", how do you echo the element with index number 2? Hint: this is NOT the correct answer: echo "$data[2]" # with or without the quote marks How do you make a script executable? More specifically, what thing(s) does a script need in order to be executable? =========================================================== Remember that (( )) is required to evaluate arithmetic. Arithmetic is done with all integers; no decimal points. You use [ ] to test conditions for both numbers and strings If you use [[ ]] to test conditions, it will do tests as strings. p. 887 Know how to write a case statement in a shell script, or at least know how to interpret one.