This quiz must be turned in by 8:30 pm!
| Name |
Write regular expressions to match lines satisfying each of the following five criteria:
the line contains at least one 'a'
| These match | These don't |
|---|---|
| xxx a a xxx | zzzzzzz |
| This one is easy | Don't miss it |
|
write your answer in this box
|
|
every occurrence of the letter 'q' is immediately followed by the letter 'u'
| These match | These don't |
|---|---|
| Be quiet | Vacation in Iraq |
| uuuuuuuuuu | qwerty |
| This quiz is fun! | qqu |
|
write your answer in this box
|
|
the line contains either of the strings "rain" or "shine"
| These match | These don't |
|---|---|
| Let it rain | Let it pour |
| Don't miss the train | It snowed last week |
| rain or shine | Partly cloudy |
|
write your answer in this box
|
|
the line contains both of the strings "rain" and "shine"
| These match | These don't |
|---|---|
| train in moonshine | tsnow in moonshine |
| rain and shine | rise and shine |
| shine and rain | out of good bad examples |
|
write your answer in this box
|
|
the line ends with the character '7'
| These match | These don't |
|---|---|
| 007 | James Bond |
| Boeing 777 | 77 Sunset Strip |
|
write your answer in this box
|
|
Show how to use the find program
to generate a list of all regular files beneath your home directory that are not named assignment.c
|
write your answer in this box
|
to remove all regular files beneath your home directory named netscape.cache that either are over 500 blocks in size or were last accessed over 100 days ago
|
write your answer in this box
|
