How to remove BOM from UTF-8 using sed? Commands Add comments Jan 222010 How to remove BOM from UTF-8 using sed? Answer: # sed -e '1s/^\xef\xbb\xbf//' text.txt Related posts: Remove newline character from the end of a string in Perl How to remove HTML from text using PHP? Remove specified lines from a file using sed How to remove BOM from UTF-8? Remove package with Yum Leave a Reply Cancel reply Name (required) E-mail (required) URI Your Comment You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>