Skip to content

Instantly share code, notes, and snippets.

@alexzaporozhets
Created December 20, 2013 08:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexzaporozhets/8052124 to your computer and use it in GitHub Desktop.
Save alexzaporozhets/8052124 to your computer and use it in GitHub Desktop.
Convert CRLF to LF (dos2unix)
# 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