Shell interview question

There was a case study to complete, testing mainly logical thinking.