echo '/$scratchfilename='$scratchfilename
for f in $*; do
+ if egrep '( |[ ]+$)' $f >/dev/null
+ then
+ echo '/$f'=$f
- echo '/$f'=$f
+ # We reuse the "expand" GNU utility to remove tabs, but if it turns out
+ # not to be available everywhere (or someone has defined "expand" to
+ # mean something else on some other class of system!) we could probably
+ # hand-code a replacement in a few lines.
+ expand $f > $scratchfilename
- # We reuse the "expand" GNU utility to remove tabs, but if it turns out
- # not to be available everywhere (or someone has defined "expand" to
- # mean something else on some other class of system!) we could probably
- # hand-code a replacement in a few lines.
- expand $f > $scratchfilename
-
- sed 's/[ ]*$//' < $scratchfilename > $f
+ sed 's/[ ]*$//' < $scratchfilename > $f
+ fi
done
-rm $scratchfilename
+rm -f $scratchfilename