226 |
# show missing and set the right retval |
# show missing and set the right retval |
227 |
if [[ -z ${missing} ]] |
if [[ -z ${missing} ]] |
228 |
then |
then |
229 |
rvecho "${sorted}" |
# do not escape, or CRLFS get printed to screen too |
230 |
|
rvecho ${sorted} |
231 |
return 0 |
return 0 |
232 |
else |
else |
233 |
for req in ${sorted} |
for req in ${sorted} |
235 |
if no_duplicate "${missing}" "$req" |
if no_duplicate "${missing}" "$req" |
236 |
then |
then |
237 |
# print normal |
# print normal |
238 |
rvecho -n " ${req}" |
rvecho -n "${req} " |
239 |
else |
else |
240 |
# print missing |
# print missing |
241 |
eecho -n " ${req}" |
eecho -n "${req} " |
242 |
fi |
fi |
243 |
done |
done |
244 |
|
# print CRLF |
245 |
|
echo |
246 |
return 1 |
return 1 |
247 |
fi |
fi |
248 |
} |
} |
414 |
-mindepth) shift; opts+=" -mindepth $1" ;; |
-mindepth) shift; opts+=" -mindepth $1" ;; |
415 |
-maxdepth) shift; opts+=" -maxdepth $1" ;; |
-maxdepth) shift; opts+=" -maxdepth $1" ;; |
416 |
-type) shift; type="$1" ;; |
-type) shift; type="$1" ;; |
417 |
-name) shift; opts+="-name $1" ;; |
-name) shift; opts+=" -name $1" ;; |
418 |
'') continue ;; |
'') continue ;; |
419 |
*) path="$1" ;; |
*) path="$1" ;; |
420 |
esac |
esac |
436 |
# default to files |
# default to files |
437 |
[[ -z ${type} ]] && type=f |
[[ -z ${type} ]] && type=f |
438 |
|
|
439 |
for i in $(find ${path} ${opts} -type ${type} -print '%f\n' | sort) |
for i in $(find ${path} ${opts} -type ${type} -printf '%f\n' | sort) |
440 |
do |
do |
441 |
if [[ -z ${retval} ]] |
if [[ -z ${retval} ]] |
442 |
then |
then |