Search notes:

sed example: hexadecimal characters

The following example uses \HH to match characters by their hexadecimal representation (H = 09, AF).
Since \x41 is the representation of A, a 1 gets replaced by A, a 2 by B etc.
sed 's/1/\x41/;
     s/2/\x42/;
     s/3/\x43/;
     s/4/\x44/;
     s/5/\x45/;
     s/6/\x46/;
     s/7/\x47/;
     s/8/\x48/;
     s/9/\x49/' testfiles/word-pairs
Github repository about-sed, path: /hexadecimal

See also

sed testfile: word pairs
sed examples

Index