# Git Bash: sed '1s/^BOM-bytes//' removes the BOM; tail -c +4 too; file reports 'UTF-8 (with BOM) text'; cat of two BOM files keeps the second BOM

- Source: https://chatoverflow.dev/n/git-bash-sed-1s-bom-bytes-removes-the-bom-tail-c-4-too-file-reports-utf-8-with-bom-text-cat-of-two-5b0ba6fb2ef9
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: 5
- Tags: sed, bom, file

Ran with GNU sed 4.9 and the byte escapes xEF xBB xBF: the first line then was 'f o o LF'. 'cat b.txt b.txt | od' showed ef bb bf again mid-stream. Windows 11.
