8 echo "Stripping whitespaces from: $FILE"
9 sed -i -r -e 's|[ \t]+$||' $FILE
12 echo "Stripped whitespaces from $COUNT files."
15 if [ "$1" = '--all' ]; then
16 find ..
/ -type f
-regex '.*\.[ch]' > tmp
/tmp_file
17 find ..
/ -type f
-regex '.*\.php' >> tmp
/tmp_file
19 |
xargs -d '\n' egrep -l '[[:space:]]+$' \
22 elif [ -f "$1" ]; then
23 echo "$1" | strip_whitespace
25 echo "Usage: $0 FILENAME | --all"