find . -type d -maxdepth 1 | while read dir
do
test $(ls -1 "$dir" | wc -l) -eq 1 && command
done