When editing php files, via the command line, there is a newline character after the closing ?> Im looking for a command that would trim files, so that I can append it to the find command. find ./ -name '*.php' -exec SOME_COMMAND {} \; Thanks