Created
December 20, 2013 08:50
-
-
Save alexzaporozhets/8052124 to your computer and use it in GitHub Desktop.
Convert CRLF to LF (dos2unix)
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
# install on OSX | |
brew install dos2unix | |
# find all CRLF files | |
find . -not -type d -exec file "{}" ";" | grep CRLF | |
# convert all files to LF | |
find . -type f -print0 | xargs -0 dos2unix | |
# get count changed files | |
git status | grep 'modified:' | wc -l |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment