remove trailing whitespace
find . -type f -a ! -regex '\./\.git/.*' -a ! -name '*.ps' -a ! -name '*.daase' -a ! -name '*.icns' -exec sed -i 's/[ \t]*$//' {} \;
remove trailing empty lines
find . -type f -a ! -regex '\./\.git/.*' -a ! -name '*.ps' -a ! -name '*.daase' -a ! -name '*.icns' -exec sed -i -e :a -e '/^\n*$/{$d;N;};/\n$/ba' {} \;
expand tabs to spaces
for f in $(grep -lR ' ' *|grep -v Make|grep -v config|fgrep -v '.as'|grep -v '.ht$'|grep -v 'diff$'|grep -v 'icns$'|grep -v rules|grep -v ChangeLog); do expand $f > $f.x; mv $f.x $f; done