#!/bin/sh # quick script to list all directories if [ "x$1" != "x" ]; then ls -d "$1" -- */ else ls -d -- */ fi