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' {} \;

Comments

Leave a Reply