Write a linux shell scripts that does the following:
Check to see if the directory $HOME/Lab7 exists. If it does,delete it and any contents.
Then, create the directory(empty).
Then, using a C-style for-loop, create ten files name file-0,file-1….file-9(using touch) within the %HOME/Lab7 directory.
Then provide a listing of $HOME/Lab7.
This is what it should look like:
hurley@hurley-VirtualBox ~/scripts $Lab7Script
Deleting existing directory/home/hurley/Lab7 and all contents…done.
Creating empty/home/hurley/Lab7…done.
Listing of /home/hurley/Lab7:
Creating ten files…done.
Listing of /home/hurley/Lab7:
file-0 file-1 file-2 file-3 file-4 file-5 file-6 file-7 file-8 file-9
hurley@hurley-VirtualBox ~/scripts$
Answer
NOTE: I have completed answers for your question along withexplanation. Please check and let me know if you have anyquestions. I