Skip to content

Instantly share code, notes, and snippets.

@JanTvrdik
Last active September 29, 2015 21:07
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JanTvrdik/1667698 to your computer and use it in GitHub Desktop.
Save JanTvrdik/1667698 to your computer and use it in GitHub Desktop.
Shell script for automatic fixing EOL
#!/bin/bash
find . \( \
-name '*.php' -o \
-name '*.phtml' -o \
-name '*.html' -o \
-name '*.latte' -o \
-name '*.neon' -o \
-name '*.css' -o \
-name '*.js' -o \
-name '*.txt' -o \
-name '*.config' -o \
-name '*.c' -o \
-name '*.cpp' -o \
-name '*.h' -o \
-name '.htaccess' -o \
-name '.gitignore' \
\) \
-exec echo {} \; \
-exec dos2unix --d2u {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment