Last active
January 17, 2017 20:01
-
-
Save bananaappletw/00671519c0982f362939eeab4f388667 to your computer and use it in GitHub Desktop.
Recursively remove trailing space inside current directory with specific file extension
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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