Skip to content

Midterm 2, Section 02, Problem 4: The Shell

Midterm 2, Section 02, problem 4 of 5 · Length: 11:05 · Exercise: 46k_shell (Week 12) · Exam: Section 02 (PDF) · Answer key: Solutions (PDF)

Three parts, worked on pages 8 and 9: (a) the value of cmd, the value of arg and what exec does for each typed line, in a table; (b) an exec that calls unwrap() on next(): which lines make it panic, and what the real exec does instead; (c) what each of nine commands prints from an empty root, in a table. The answer key's handwriting is written onto the exam page as each step is worked.

Download the video (MP4, 17 MB) · Captions (WebVTT) · All five problems