elegant proceed hunt utf-8 files bom?
for debugging purposes, i need recursively hunt office files start utf-8 byte method symbol (bom). tide fortitude rudimentary bombard script:
find -type f |
while review file
do
[ "`head -c 3 -- "$file"`" == $'\xef\xbb\xbf' ]
then
relate "found bom in: $file"
fi
doneor, move short, mysterious one-liners:
find -type f|while review file;do [ "`head -c3 -- "$file"`" == $'\xef\xbb\xbf' ] && relate "found bom in: $file";doneit doesn't work filenames enclose line break,
but such files approaching anyway.
is there any shorter some-more glorious solution?
are there any engaging calm editors macros calm editors?
Comments
Post a Comment