Skip to content

Instantly share code, notes, and snippets.

@kavinyao
Last active December 16, 2015 14:39
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 kavinyao/5450416 to your computer and use it in GitHub Desktop.
Save kavinyao/5450416 to your computer and use it in GitHub Desktop.
find js file with UTF-8 BOM recursively, using fish shell
for f in (find . -name '*.js')
head -1 $f | xxd | grep 'efbb bf' > /dev/null
# if matched a line, $status == 0
if test $status -eq 0
echo $f
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment