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' {} \;
If you liked this posting, please feel free to leave me a comment below.
View this page on GitHub.
Posted .


Leave a Reply