[BusyBox] Trivial whitespace cleanup
Larry Doolittle
ldoolitt at recycle.lbl.gov
Sat Apr 17 22:45:04 UTC 2004
Erik -
Could you run this script on your source tree?
On my copy, it finds 18 C source files (*.[ch]) with
trailing whitespace, all useless. The script is much
shorter and (I hope) less likely to get corrupted
by mailers and web gateways than the patch is.
The whitespace between [ ]'s are both supposed to
be <space><tab>.
- Larry
---cut here---
#!/bin/sh
# Get rid of trailing spaces and tabs in C source code.
# Don't mess up the time stamps of files that don't need changing.
# Show progress by listing the files that are changed.
for f in `find . -name "*.[ch]"`; do
if grep "[ ]$" $f >/dev/null; then
echo $f
sed -e 's/[ ]*$//' <$f >temp.$$
mv temp.$$ $f
fi
done
---cut here---
More information about the busybox
mailing list