I tried using bbe as below
bbe -e 's/01110011/01111000/' test.txt
All I'm trying to accomplish in this example is to read the file as if it's a binary file, and replacing the letter s with x.
I'm open to alternative solutions, I'm not stuck on bbe
To my knowledge, bbe cannot use binary (base 2) patterns directly. Hexadecimal, octal, or decimal work, however:
$ echo 'xs' | bbe -e 's/\x73/\x78/'
$ echo 'xs' | bbe -e 's/\0163/\0170/'
$ echo 'xs' | bbe -e 's/\115/\120/'