How to find a windows end of line (EOL) character
The file(1)
utility knows the difference:
$ file * | grep ASCII2: ASCII text3: ASCII English texta: ASCII C program textblah: ASCII Java program textfoo.js: ASCII C++ program textopenssh_5.5p1-4ubuntu5.dsc: ASCII text, with very long lineswindows: ASCII text, with CRLF line terminators
file(1)
has been optimized to try to read as little of a file as possible, so you may be lucky and drastically reduce the amount of disk IO you need to perform when finding and fixing the CRLF terminators.
Note that some cases of CRLF should stay in place: captures of SMTP will use CRLF. But that's up to you. :)