Shell Interview Question

Based on the reading material, how would you solve this problem.