Skip to content

Instantly share code, notes, and snippets.

@ashsmith
Created July 26, 2012 12:13
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 ashsmith/3181711 to your computer and use it in GitHub Desktop.
Save ashsmith/3181711 to your computer and use it in GitHub Desktop.
Line Endings Fix
# 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