Answer:
Explanation:
The scripts to execute these two cammad in the question is in the attached images below, and kindly note that output that is displayed on my pc that might be different from that of yours since the directory they have given is not present here in my VM (virtual machine).
The first image is for the first question while the sencond image is for the second question.