Question: in linux coding Write a script named listEmptyDir.sh that will do the following: (a) take a name of a directory as a parameter; (b) loop
in linux coding
Write a script named listEmptyDir.sh that will do the following: (a) take a name of a directory as a parameter; (b) loop through all files in this directory and display their names; (c) if a file is a directory and has no files in it (empty directory), add the name of this empty directory to the file EmptyDir.txt in your current directory. If the number of parameters is not 1 or a parameter is not a directory, display the usage message and exit with non-zero status. Your file for submission should demonstrate that you have investigated all possible situations.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
