Skip to content

Instantly share code, notes, and snippets.

@bananaappletw
Last active January 17, 2017 20:01
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 bananaappletw/00671519c0982f362939eeab4f388667 to your computer and use it in GitHub Desktop.
Save bananaappletw/00671519c0982f362939eeab4f388667 to your computer and use it in GitHub Desktop.
Recursively remove trailing space inside current directory with specific file extension
# http://stackoverflow.com/questions/10711051/how-to-remove-trailing-whitespaces-for-multiple-files
# Remove trailing space inside current directory with file extension *.rb
find ./ -type f -name '*.rb' | xargs sed --in-place 's/[[:space:]]\+$//'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment