# cat bbb-subfolder.sh for d in ./*; do if [ -d "$d" ]; then echo "$d" for e in $d/*;do if [ -d "$e" ]; then echo "$e" fi done fi done