Listing only Directories

So as part of this little repository I made for myself, I’ve built a script to regenerate the the required apt files.

But here is the issue: I’ve got a symlink called “6.06” pointing to the “dapper” directory. I don’t wish to regenerate both, as they are identical contents, and ls -d */ returns the symlink as a directory. I’ve resorted to using some command-line kung-fu to get around this, but if anybody happens to know of a better way, please let me know:

ls -F | grep "/" | sed -e "s////"

Update 2009-09-30

I’ve decided to update this a few years after publishing incase anybody comes from google looking for an answer. This was an extremely bad way to do this. What you should be using is find:

find . -type d

The above runs find in your current directory looking for directories. If you do not want a recursive listing, specify -maxdepth 1.