Added script to remove writespaces at end of line.

git-svn-id: http://yate.null.ro/svn/yate/trunk@881 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
paulc 2006-06-19 12:42:40 +00:00
parent 7c463f7eb9
commit 762fafb670
1 changed files with 13 additions and 0 deletions

13
tools/rmendw.sh Executable file
View File

@ -0,0 +1,13 @@
#!/bin/sh
grep -l -r '[[:space:]]\+$' * | while read fn; do
echo -n "Processing: $fn ..."
sed 's/[[:space:]]\+$//' < "$fn" > "$fn.tmp"
if cmp -s "$fn" "$fn.tmp"; then
echo " unchanged"
rm "$fn.tmp"
else
echo " changed"
mv "$fn.tmp" "$fn"
fi
done