Created
March 20, 2012 21:44
-
-
Save MarkRose/2141626 to your computer and use it in GitHub Desktop.
Convert spaces to tabs
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/sh | |
# Have to work with coders who use 4 spaces indentation instead of tabs? This is my shortcut to mending their ways. | |
for i in $(ls) ; do expand -t4 $i > $i.broken ; unexpand -t4 --first-only $i.broken > $i ; rm $i.broken ; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment