Skip to content

Instantly share code, notes, and snippets.

@henter
Created June 5, 2014 12:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save henter/dd3ecbdbf3cf91cf7e88 to your computer and use it in GitHub Desktop.
Save henter/dd3ecbdbf3cf91cf7e88 to your computer and use it in GitHub Desktop.
check php file ending
#!/bin/bash
for filename in $(
find . -name "*.php"
)
do
r=`sed -n '$p' "$filename"`
if [[ $r == "?>" ]]
then
echo "$filename"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment