# here's shell oneliner to remove ?> from all files which have it on their last line: find -name '*.php' -o -name '*.inc' -print0 | xargs -0r sed -i -e'${/^?>$/d}'# sometimes if you are hit by this problem, you need to kill last empty line first: find -name '*.php' -o -name '*.inc' -print0 | xargs -0r sed -i -e'${/^$/d}'# and as well can remove trailing spaces/tabs: find -name '*.php' -o -name '*.inc' -print0 | xargs -0r sed -i -e's/[\t ]\+$//
-- glen