411 |
-mindepth) shift; opts+=" -mindepth $1" ;; |
-mindepth) shift; opts+=" -mindepth $1" ;; |
412 |
-maxdepth) shift; opts+=" -maxdepth $1" ;; |
-maxdepth) shift; opts+=" -maxdepth $1" ;; |
413 |
-type) shift; type="$1" ;; |
-type) shift; type="$1" ;; |
414 |
-name) shift; opts+="-name $1" ;; |
-name) shift; opts+=" -name $1" ;; |
415 |
'') continue ;; |
'') continue ;; |
416 |
*) path="$1" ;; |
*) path="$1" ;; |
417 |
esac |
esac |
433 |
# default to files |
# default to files |
434 |
[[ -z ${type} ]] && type=f |
[[ -z ${type} ]] && type=f |
435 |
|
|
436 |
for i in $(find ${path} ${opts} -type ${type} -print '%f\n' | sort) |
for i in $(find ${path} ${opts} -type ${type} -printf '%f\n' | sort) |
437 |
do |
do |
438 |
if [[ -z ${retval} ]] |
if [[ -z ${retval} ]] |
439 |
then |
then |