Skip to content

Instantly share code, notes, and snippets.

@gcatlin
Created February 15, 2012 15:58
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 gcatlin/1836898 to your computer and use it in GitHub Desktop.
Save gcatlin/1836898 to your computer and use it in GitHub Desktop.
Strip trailing whitespace from files
# source: http://stackoverflow.com/questions/149057/how-to-removing-trailing-whitespace-of-all-files-recursively
find . -not \( -name .svn -prune -o -name .git -prune \) -type f -print0 | xargs -0 sed -i '' -E "s/[[:space:]]*$//"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment