Created
July 26, 2012 12:13
-
-
Save ashsmith/3181711 to your computer and use it in GitHub Desktop.
Line Endings Fix
This file contains hidden or 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
# Replace all files line endings from current directory onwards. | |
$ find . -type f -exec perl -pi -e 's/\r\n?/\n/g' {} \; | |
# Only replace line endings in php files within current directory | |
$ perl -pi -e 's/\r\n?/\n/g' *.php |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment