
Final exam: Thursday
December 13, 8:10-10:00 in Todd 334.
Notes:
1. The exam is about as long as the midterm, but
you have 110 minutes rather than 50 minutes
2. The exam is NOT comprehensive. However, you
will want to not forget everything from the first half, including shell file
name expansion.
Final Exam Topics
- Given a regular
expression, understand what it will (and won't) match.
- Given an English
phrase, come up with a regular expression that matches it
- Be able to do the
above two things also with shell
file name expansion
- Given a sed command,
understand what the output will be.
- In s/OLD/NEW/g, how to use part (or
all) of what is matched in OLD with NEW (e.g., \1)
- Given an awk script, tell
what it does.
- Write a simple awk script
for a given problem.
- How to use something other
than a newline for a record delimeter (see man page… there are two
ways to do it, just know one)
- Given a shell script, tell
what it does.
- Write a simple shell script
for a given problem
- Given a Ruby script, tell
what it does.
- Know some of the main
language features. Anything
in the notes or in what you had to do for your programming assignment is
fair game.
- While I will directly test
nothing from it that is not in my notes or what you have to program,
here would be good sections to read from the Ruby
Essentials: 2, 4, 6, 7, 9, 11, 12. This may
help reinforce what you have seen in my notes or had to program.
- If you can do some things
more than on way in Ruby, be able to give more than one example! (E.g.,
ways to load in a key, value pair into an associative array.)
- Language differences (sed, awk, shell, ruby)
- Understand the differences
in the languages.
- Know how "if-then-else
if-else" is constructed in each language.
- Know what $0 means in each
language.
- Know what $1, $2, $3, etc.
means in each language.
- Know how to get command
line arguments (except for sed).
- Know why you might want to
use one language instead of the other.
- Typing differences: what happens
for example if you go (except for sed)
- set a to 2
- set b to “foo”
- set c to a plus b
- I am not interested in teaching the very fine details (minutia) or
rare boundary cases of syntax/semantics of a language, so focusing on
that will help you at most a point or two, probably zero. I just want you to be as
reasonably versed as the number of lectures and homework assignments can
reasonably make a sophomore be.