I created in
mkdir somedir ln -s somedir/ somelink
I want to loop through only directories:
for file in */ ; do if [[ -d "$file" && ! -L "$file" ]]; then echo "$file is a directory"; fi; done
but why does this show
somelink is a directory?
while without the slash it doesent?
for file in * ; do ...
And is there a difference in zsh?