1 2 3 4 5 6 7 8
#!/bin/sh # quick script to list all directories if [ "x$1" != "x" ]; then ls -d "$1" -- */ else ls -d -- */ fi