Created
September 7, 2011 22:25
-
-
Save senmu/1201985 to your computer and use it in GitHub Desktop.
Recursively convert Windows CR+LF to Unix LF in bash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The following command can be entered in the terminal to convert files in the current directory | |
# to Unix LF which comes in handy when trying to add code to a git repo and you are faced with | |
# the error: fatal: CRLF would be replaced by LF | |
find . -name *.* -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