This practice quiz is designed to prepare you for your third quiz. The length and difficulty should match the real quiz, while the exact material covered may be different. On the real quiz, you may see any material covered in the section's readings.
In addition to this practice quiz, we suggest you attempt the following book exercises to prepare you for the quiz.
Das: 11.2-11.6, 11.10, 11.12, 11.13, 11.20, 11.21, 11.26-11.29, 11.32
In an effort to get an advantage over the Mario Brothers, Wario and Waluigi have decided to rig the "random" item boxes at Wario Stadium. Their goal is to learn which boxes get picked the least during the practice laps and put all the good items in those boxes for the real race. The data they gathered is stored in a file in the following format:
<box itentifier>:<number of times grabbed by Mario>:<... Luigi>:<... Toad>:<... Yoshi>
Example:
Box 1:4:2:1:2 Box 2:0:1:3:2 Box 3:1:3:3:1
In the above example, Mario grabbed box one 4 times, but never grabbed box 2. Similarly, Yoshi grabbed boxes one and two 2 times each.
Create a command or sequence of commands that will list all boxes which neither Mario nor Luigi grabbed more than twice.
In one of their super-secret covert operations, the ETIA (Elite Toad Intelligence Agency) uncovered Wario and Waluigi's plot. When presented with the evidence, princess peach decided to give the dasterdly brothers a taste of their own medicine. You have been asked to alter their database to cause Wario & Luigi's plan to backfire on them. Design a sed command which will swap Mario's counts with Wario's and Luigi's with Waluigi's.
Example:
Box 1:4:2:1:2 Box 2:0:1:3:2 Box 3:1:3:3:1
Becomes:
Box 1:1:2:4:2 Box 2:3:2:0:1 Box 3:3:1:1:3