Skip to content

Instantly share code, notes, and snippets.

@jonblack
Created May 15, 2014 08:28
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 jonblack/9a3f70e25fb4ab274d7e to your computer and use it in GitHub Desktop.
Save jonblack/9a3f70e25fb4ab274d7e to your computer and use it in GitHub Desktop.
Useful shell commands for manipulating source code
# Remove trailing whitespace from all files with a given extension
find . -name "*.h" | xargs sed -i 's/[ \t]*$//'
# Convert tabs to spaces in all files with a given extension
find . -name "*.h" | xargs sed -i 's/\t/ /g'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment