Apologies. I confused two sources I was reading. Here's how to use <code>sed</code> to remove a BOM: <https://unix.stackexchange.com/questions/381230/how-can-i-remove-the-bom-from-a-utf-8-file> Or you can use <code>tail</code>: <code>tail -c +4 withBOM.txt > withoutBOM.txt</code>