Skip to content

Instantly share code, notes, and snippets.

@ordovician
Created October 18, 2018 09:25
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 ordovician/3861065b8b77b61ee9d81494b7810111 to your computer and use it in GitHub Desktop.
Save ordovician/3861065b8b77b61ee9d81494b7810111 to your computer and use it in GitHub Desktop.
[Remove trailing whitespace] Allows you to do through all files in subdirecttory and remove any occurance of trailing whitespace. Make sure you got these files under version control as it will do in place replacement. #unix #shell #sed
find . -type f | xargs sed -i 's/[ \t]*$//'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment