First you must download the source tarball.
Copy or move the tarball to a directory of your choosing then:
tar -xzf hexsed-1.0.tar.gz
sudo make install
The program operates on strings of bytes in a file and writes to stdout. Every byte in the string must be specified using 2 hex characters, 00, 0A, FF etc.
There are only 2 commands, s - substitute and d - delete. The only legal separator is '/'.
The program operates on all lines in the source file and no line number specification is possible.
The program also provides options to generate the hex values of various other representations as follows:
hexsed /E280A80A/0A/s tmpfil > x # remove <U+2028> before the line end.
mv x tmpfil # copy output back to source.
hexsed /E280A8/20/s tmpfil > x # replace <U+2028> with a space.
mv x tmpfil
Go to the top of the page