Here you can easily identify files containing mixed line endings:
cat -A $FILE | grep '\^M\^M\$'
-A implies -v and -E , which includes strings and other hidden characters. For example, create a test file. I will use the actual text, which will be displayed close enough with the ends of the lines that you will see:
$ od -x test1.txt 0000000 6464 2061 0d20 0a0d 6464 6161 2020 0d0d 0000020 0a0a 6164 2020 0a0d 0000030
Now let's see what the cat gives us:
$ cat -vE test1.txt dda ^M^M$ ddaa ^M^M$ $ da ^M$
cat really shows us CR and LF (although LF do not appear on the same line - and this is justified), now we can find them:
find /path -yourPredicatesOfInterest -print | while read fn ; do cat -A $fn | grep '\^M\^M\$' > /dev/null 2>&1 && echo "$fn contains multiple CR CR LFs" done
source share