sd cannot search & replace binary bytes in the range 0x80 to 0xFF
Author: dungsagaCreated Feb 6, 2025Updated Apr 22, 2026
LabelsM-invalid
sd converts search string and replacement string into UTF-8. Thus, sd cannot search & replace binary bytes in the range 0x80 to 0xFF.
For example:
sd '\xC4' 'xC7' binary-file would not replace byte 0xC4 with byte 0xC7
Source: chmln/sd