loop through directories bash

Shell
#loops only through directories
for d in */ ; do
    echo "$d"
done
Source

Also in Shell: