Replace CRLF with LF in list a files using the find command

Find files containing the Windows newline character (CRLF) and replace them with Unix newlines (LF).

$ find . -type f -exec perl -pi -e 's/\r\n|\n|\r/\n/g' {} \;
Did this help you? Please let me know with a comment. Thank you
Posted .

Comments (RSS)

Leave a comment