summaryrefslogtreecommitdiffstats
path: root/text-utils/hexdump.1
diff options
context:
space:
mode:
Diffstat (limited to 'text-utils/hexdump.1')
-rw-r--r--text-utils/hexdump.138
1 files changed, 38 insertions, 0 deletions
diff --git a/text-utils/hexdump.1 b/text-utils/hexdump.1
index e8afdbac8..8b4bf275d 100644
--- a/text-utils/hexdump.1
+++ b/text-utils/hexdump.1
@@ -235,6 +235,37 @@ displayed using the following, lower-case, names. Characters greater than
018 can 019 em 01A sub 01B esc 01C fs 01D gs
01E rs 01F us 0FF del
.nf
+.SS 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.
+.TP
+.B \&_L[color_unit_1,color_unit_2,...,color_unit_n]
+.TP
+The full syntax of a color unit is as follows:
+.TP
+.B [!]COLOR[:HEX_VAL|:OCT_VAL|:STRING][@DEC_OFFT|@DEC_OFFT_START-DEC_OFFT_END]
+.TP
+.B !
+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.
+.PP
+.BR COLOR
+One of the 8 basic shell colors.
+.PP
+.BR HEX_VAL , OCT_VAL
+A value to be matched specified in hexadecimal or octal base.
+.PP
+.BR STRING
+A string to be matched. Please note that the usual C escape sequences
+are not interpreted by hexdump inside the color_units.
+.PP
+.BR DEC_OFFT , DEC_OFFT_START , DEC_OFFT_END
+An offset or an offset range at which
+to check for a match. Please note that DEC_OFFT is equal to DEC_OFFT-DEC_OFFT.
+Also, the range may not be larger than the respective format byte count.
.SS Counters
The default and supported byte counts for the conversion characters
are as follows:
@@ -313,6 +344,13 @@ Implement the \-x option:
"%07.7_Ax\en"
"%07.7_ax " 8/2 "%04x " "\en"
.nf
+.PP
+MBR Boot Signature example:
+Highlight the addresses cyan and the bytes at offsets 510 and 511 green if their value is 0xAA55, red otherwise.
+.nf
+ "%07.7_Ax_L[cyan]\en"
+ "%07.7_ax_L[cyan] " 8/2 " %04x_L[green:0xAA55@510-511,!red:0xAA55@510-511] " "\en"
+.nf
.SH STANDARDS
The
.B hexdump