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

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1758200478, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/sed/examples/hexadecimal(55): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78