diff options
-rw-r--r-- | v4l/scripts/strip-trailing-whitespaces.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/v4l/scripts/strip-trailing-whitespaces.sh b/v4l/scripts/strip-trailing-whitespaces.sh new file mode 100644 index 000000000..592320e6a --- /dev/null +++ b/v4l/scripts/strip-trailing-whitespaces.sh @@ -0,0 +1,8 @@ +#!/bin/sh +for file in *.[ch]; do + echo "### file" + tmpfile="${file}.$$" + perl -ne 's/[ \t]+$//; print' < "${file}" > "$tmpfile" + diff -u "$file" "$tmpfile" + rm -f "$tmpfile" +done |