Home Explore Blog CI



man-pages

3rd chunk of `hd.man`
2cf9063b8a5d5c481c73ab87c32dc2a16a8ca851e255ed5b0000000100001454
 ├───────────────────┼────┤
          │                   │    │
          │ <tab>             │ \t │
          ├───────────────────┼────┤
          │                   │    │
          │ <vertical tab>    │ \v │
          └───────────────────┴────┘

   Conversion strings
       The hexdump utility also supports the following additional
       conversion strings.

       _a[dox]
           Display the input offset, cumulative across input files, of
           the next byte to be displayed. The appended characters d, o,
           and x specify the display base as decimal, octal or
           hexadecimal respectively.

       _A[dox]
           Almost identical to the _a conversion string except that it
           is only performed once, when all of the input data has been
           processed.

       _c
           Output characters in the default character set. Non-printing
           characters are displayed in three-character, zero-padded
           octal, except for those representable by standard escape
           notation (see above), which are displayed as two-character
           strings.

       _p
           Output characters in the default character set. Non-printing
           characters are displayed as a single '.'.

       _u
           Output US ASCII characters, with the exception that control
           characters are displayed using the following, lower-case,
           names. Characters greater than 0xff, hexadecimal, are
           displayed as hexadecimal strings.
          ┌─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐
          │         │         │         │         │         │         │
          │ 000 nul │ 001 soh │ 002 stx │ 003 etx │ 004 eot │ 005 enq │
          ├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
          │         │         │         │         │         │         │
          │ 006 ack │ 007 bel │ 008 bs  │ 009 ht  │ 00A lf  │ 00B vt  │
          ├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
          │         │         │         │         │         │         │
          │ 00C ff  │ 00D cr  │ 00E so  │ 00F si  │ 010 dle │ 011 dc1 │
          ├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
          │         │         │         │         │         │         │
          │ 012 dc2 │ 013 dc3 │ 014 dc4 │ 015 nak │ 016 syn │ 017 etb │
          ├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
          │         │         │         │         │         │         │
          │ 018 can │ 019 em  │ 01A sub │ 01B esc │ 01C fs  │ 01D gs  │
          ├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
          │         │         │         │         │         │         │
          │ 01E rs  │ 01F us  │ 0FF del │         │         │         │
          └─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘

   Colors
       When put at the end of a format specifier, hexdump
       highlights the respective string with the color
       specified. Conditions, if present, are evaluated prior
       to highlighting.

       _L[color_unit_1,color_unit_2,...,color_unit_n]

       The full syntax of a color unit is as follows:

       [!]COLOR[:VALUE][@OFFSET_START[-END]]

       !
           Negate the condition. Please note that it only makes
           sense to negate a unit if both a value/string and an
           offset are specified. In that case the respective
           output string will be highlighted if and only if the
           value/string does not match the one at the offset.

       COLOR
           One of the 8 basic shell colors.

       VALUE
           A value to be matched specified in hexadecimal, or
           octal base, or as a string. Please note that the
           usual C escape sequences are not interpreted by
           hexdump inside the color_units.

       OFFSET
           An offset or an offset range at which to check for a
           match. Please note that lone OFFSET_START uses

Title: Hexdump Conversion Strings and Color Highlighting
Summary
This section details the additional conversion strings supported by the hexdump utility, including _a (input offset), _A (final input offset), _c (default character set output), _p (printable characters), and _u (US ASCII output with control character names). It then describes how to use color highlighting within hexdump format specifiers using the _L[color_unit_1,color_unit_2,...,color_unit_n] syntax, including the syntax for color units, value matching at offsets, and the negation of color highlighting conditions.