Created
December 30, 2010 21:23
-
-
Save danielnorberg/760316 to your computer and use it in GitHub Desktop.
A simple script to recursively remove trailing whitespace from Objective-C source code files in a directory.
This file contains 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
#!/bin/bash | |
if [ $# -gt 0 ]; then | |
echo | |
echo Removing trailing whitespace in $1 | |
echo | |
find $1 -type f -iname '*.[hm]' -exec gsed -i 's/[[:space:]]*$//' '{}' ';' | |
else | |
echo | |
echo Usage: | |
echo remove-trailing-whitespace [target-dir] | |
echo | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment