Created
December 12, 2011 16:15
-
-
Save bluefuton/1468061 to your computer and use it in GitHub Desktop.
OS X: replace tabs with spaces in all files using expand
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 "*.php" | while read line; do expand -t 4 $line > $line.new; mv $line.new $line; done |
Thanks. I was going crazy trying to use linux commands on mac os. Even freebsd commands are not 100% in mac. This saved me a lot of time.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks! For anyone reading this, replace the option
-t 4
with the number of spaces you wish to replace each tab with.