Skip to content

Instantly share code, notes, and snippets.

@yumyo
Created January 28, 2013 10:23
Show Gist options
  • Save yumyo/4654447 to your computer and use it in GitHub Desktop.
Save yumyo/4654447 to your computer and use it in GitHub Desktop.
This will recursively convert CRLF to LF in non-binary files under the current directory —source: http://bit.ly/wJxtlK
find . -type f -exec grep -qIP '\r\n' {} ';' -exec perl -pi -e 's/\r\n/\n/g' {} '+'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment