Check CSV BOM Using Bash

BOM or Byte-Order-Mark is needed by a UTF-8 CSV in order to be opened in Excel (at least for Windows).

How to check if said BOM exist using bash? See below:

1~$ head -c3 samplefile.csv | hexdump -C
200000000  ef bb bf                                          |...|
300000003

Posts in this Series