#!/bin/bash
# list dirs recursively
dir=.
if [[ -d $1 ]]; then
    dir=$1
    shift
fi
find "$dir" -type d "$@" | sort | sed -e 's#^[.]/##'

