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

