Skip to content

Instantly share code, notes, and snippets.

@Stasevi4
Created July 27, 2015 21:20
Show Gist options
  • Save Stasevi4/33b456ff95e3ff0f943c to your computer and use it in GitHub Desktop.
Save Stasevi4/33b456ff95e3ff0f943c to your computer and use it in GitHub Desktop.
Search for UTF-8 files with BOM?
find -type f |
while read file
do
if [ "`head -c 3 -- "$file"`" == $'\xef\xbb\xbf' ]
then
echo "found BOM in: $file"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment