Skip to content

Instantly share code, notes, and snippets.

@STRd6
Forked from bluefuton/gist:1468061
Created May 9, 2012 17:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save STRd6/2647338 to your computer and use it in GitHub Desktop.
Save STRd6/2647338 to your computer and use it in GitHub Desktop.
OS X: replace tabs with spaces in all files using expand
find . -name "*.[hm]" | while read line; do expand -t 2 "$line" > "$line.new"; mv "$line.new" "$line"; sed -i "" 's/ *$//' "$line"; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment