bash loop through files in directory and subdirectories code example
Example: loop through directories bash
#loops only through directories
for d in */ ; do
echo "$d"
done
#loops only through directories
for d in */ ; do
echo "$d"
done