Last active
April 4, 2016 18:24
-
-
Save lyoshenka/d9dd6cb67853bee35e9f7376a619a414 to your computer and use it in GitHub Desktop.
Finds PHP files that don't have `<?php` on the very first line. These files, when included, will cause extraneous spaces in output.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while IFS= read -r -d '' file; do | |
if [ "$(head -n 1 "$file")" != '<?php' ]; then | |
echo "$file"; | |
fi; | |
done < <(find . -name '*.php' -print0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment