Created
February 8, 2017 13:58
-
-
Save gonzalezreal/8736ef16515843a40516f92cbab42702 to your computer and use it in GitHub Desktop.
Replace spaces by tabs in all swift files
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
find . -name "*.swift" | while read line; do unexpand -t 4 $line > $line.new; mv $line.new $line; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is not going to work with a project with "spaces" in the filename.
Try this:
find . -name "*.swift" | while read line; do unexpand -t 4 "$line" > "$line.new"; mv "$line.new" "$line"; done
Hope it helps, cheers.