Skip to content

Instantly share code, notes, and snippets.

@tonit
Created March 22, 2011 08:47
Show Gist options
  • Save tonit/880947 to your computer and use it in GitHub Desktop.
Save tonit/880947 to your computer and use it in GitHub Desktop.
Fixing Mac specific line endings to Unix defaults
find . -type f -name "*.java" -exec perl -pi -e 's/\r/\n/g' \{\} \;
@tonit
Copy link
Author

tonit commented Mar 22, 2011

Comment: This is not a silver bullet. Depending on what the file endings look like currently this can also mess up things.
This works if you have CR only on your files but need LF

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment