Skip to content

Instantly share code, notes, and snippets.

@chetth
Created December 21, 2016 04:42
Show Gist options
  • Save chetth/5ededb185c05793dc154bafd47c6f9b8 to your computer and use it in GitHub Desktop.
Save chetth/5ededb185c05793dc154bafd47c6f9b8 to your computer and use it in GitHub Desktop.
How to remove BOM from UTF-8
awk '{if(NR==1)sub(/^\xef\xbb\xbf/,"");print}' text-with-bom.txt
tail --bytes=+4 text-with-bom.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment