Remove trailing white spaces and replace CRLF with LF in all files under current directory ignoring .git and .svn directories
find . -not \( -name .svn -prune -o -name .git -prune \) -type f -exec sed -i 's/[:space:]+$//' \{} \;  -exec sed -i 's/\r\n$/\n/' \{} \;