Skip to content

Instantly share code, notes, and snippets.

@STRd6
STRd6 / gist:2647338
Created May 9, 2012 17:56 — forked from bluefuton/gist:1468061
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