Created
May 20, 2013 04:44
-
-
Save iandundas/5610472 to your computer and use it in GitHub Desktop.
Convert files to Unix line endings
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
find * -name "*.js" -print0 | xargs -0 /usr/bin/dos2unix | |
find * -name "*.css" -print0 | xargs -0 /usr/bin/dos2unix | |
find * -name "*.htm" -print0 | xargs -0 /usr/bin/dos2unix | |
find * -name "*.html" -print0 | xargs -0 /usr/bin/dos2unix | |
find * -name "*.php" -print0 | xargs -0 /usr/bin/dos2unix | |
#etc | |
#where /usr/bin/dos2unix is: | |
#!/bin/sh | |
perl -pi -e 's/\r\n/\n/;' $* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment