Skip to content

Instantly share code, notes, and snippets.

@lg3bass
Created June 2, 2014 22:05
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 lg3bass/e3ec8749d3f4efc13f74 to your computer and use it in GitHub Desktop.
Save lg3bass/e3ec8749d3f4efc13f74 to your computer and use it in GitHub Desktop.
dos2unix
//convert all the files in a directory to unix line endings. from "\r\n" to "\n".
for f in *; do [[ -f $f ]] && dos2unix "$f" "$f"; done
...and if you want it to be recursive do:
find . -type f -exec dos2unix {} {} ';'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment