Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

How to remove BOM from UTF-8?

Answer:

# awk '{if(NR==1)sub(/^\xef\xbb\xbf/,"");print}' text.txt

Source: http://stackoverflow.com/questions/1068650/using-awk-to-remove-the-byte-order-mark

Updated: (Suggested by Van Overveldt Peter)

# tail --bytes=+4 text.txt