Skip to content

Instantly share code, notes, and snippets.

@andrewssobral
Forked from bluefuton/gist:1468061
Last active August 27, 2017 20:06
Show Gist options
  • Save andrewssobral/ac7bedac6e3e6f5d805d3f6d6cfcf668 to your computer and use it in GitHub Desktop.
Save andrewssobral/ac7bedac6e3e6f5d805d3f6d6cfcf668 to your computer and use it in GitHub Desktop.
OS X: replace tabs with spaces in all files using expand
# batch of files
find . -name "*.php" | while read line; do expand -t 4 $line > $line.new; mv $line.new $line; done
# single file
find CMakeLists.txt | while read line; do expand -t 2 $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