removespace.sh 252 B

1234567891011
  1. #! /bin/bash
  2. for i in `find src -regex .*\\\.[ch]pp` `find src -regex .*\\\.[ch]` ; do
  3. ORIG=`cat $i`
  4. PATCHED=`perl -p -e "s/(\s*)($)/\n/" < ${i}`
  5. if [ "$ORIG" != "$PATCHED" ] ; then
  6. echo "${PATCHED}" > ${i}
  7. # git add ${i}
  8. echo ${i}
  9. fi
  10. done