Last active
June 20, 2016 06:44
-
-
Save alpody/1e64ce3304e3f1719f65419561446edd to your computer and use it in GitHub Desktop.
Find file with bom and remove BOM from the files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grep -rl $'\xEF\xBB\xBF' | |
# remove file with bom | |
# if remove .bak then sed not create backup | |
find . -type f -exec sed '1s/^\xEF\xBB\xBF//' -i.bak {} \; -exec rm {}.bak \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment