Skip to content

Instantly share code, notes, and snippets.

@phackwer
Created March 5, 2018 17:05
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 phackwer/91bf25844b3df91dfd2d1b60ca3d6889 to your computer and use it in GitHub Desktop.
Save phackwer/91bf25844b3df91dfd2d1b60ca3d6889 to your computer and use it in GitHub Desktop.
Remove BOM recursively
grep -rl $'\xEF\xBB\xBF' `pwd` > file_with_boms.txt
while read l; do sed -i '1 s/^\xef\xbb\xbf//' $l; done < file_with_boms.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment