(Thanks jls for fixing the typo)
In my testing of both offerings so far, neither choices are accurate.
[…]
As much as I luv oneliner's, it completely missed 5 deps that were listed more than twice
Inconceivable
— The `grep` command basically outputs all lines from *dep files, provided there is no non-ASCII character inside (or that the locale is in accordance with the files' encoding), and provided that busybox' grep behaves as expected.
— The `sort` command… sorts this whole list
— The `uniq` command, with the -d parameter, points out lines that appear consecutively multiple times (remember that the list is sorted).
Let's make more allowance for encoding mismatches, or for busybox possible differences… Here's another try:
find /etc/sysconfig/tcedir/optional -maxdepth 1 -name '*.dep' -exec cat {} \; -exec echo \; | tr '\r' '\n' | grep -v '^$' | env LANG=C sort | env LANG=C uniq -d