7 echo "Stripping whitespaces from: $FILE"
8 sed -i -r -e 's|[ \t]+$||' $FILE
11 echo "Stripped whitespaces from $COUNT files."
14 if [ "$1" = '--all' ]; then
15 find .
/src
-type f
-regex '.*\.[ch]' \
16 |
xargs -d '\n' egrep -l '[[:space:]]+$' \
18 elif [ -f "$1" ]; then
19 echo "$1" | strip_whitespace
21 echo "Usage: $0 FILENAME | --all"