for each directory in bash

for D in *; do [ -d "${D}"] && my_command; done