Cleanup output when searching for leaves. Don't want to see things like warnings of looping symlinks.

This commit is contained in:
Sean McNeil
2009-04-03 08:55:18 +07:00
parent d47804e929
commit 19ea2a8843

View File

@@ -86,7 +86,7 @@ filename="${!nargs}"
# Print out all files that match, as long as the path isn't explicitly
# pruned. This will print out extraneous results from directories whose
# parents have a match. These are filtered out by the awk script below.
find -L "${@:1:$nargs-1}" $findargs -type f -name "$filename" -print |
find -L "${@:1:$nargs-1}" $findargs -type f -name "$filename" -print 2>/dev/null |
# Only pass along the directory of each match.
sed -e 's/\/[^\/]*$/\//' |