Write a shell script that takes a name of a folder as a command line argument, and produce a file that contains the names of all sub folders with size 0 (that is empty sub folders)
#! /bin/sh
ls $1 |
while read folder
do
if [ -d $1/$folder ]
then
files=ls $1/$folder | wc –l
if [ $files –eq 0 ]
then
echo $folder >> output.txt
fi
fi
done