--- /dev/null
+#!/bin/bash
+# whitespace.sh
+# Remove whitespace at the end of lines. This could go directly in the
+# Makefile if suitably quoted, but getting the quoting just right is
+# both fussy and makes the action less readable.
+# [2015-01-23]
+# I needed to remove _all_ the space, not just the last instance.
+# -Andrew
+
+for file in $@
+do
+ echo "$file: "
+ sed -i.bak -E "s/[[:space:]]*$//" $file
+ diff $file ${file}.bak
+done
+