Skip to content

Commit 8f3f785

Browse files
RestorerZchrisbra
authored andcommitted
runtime(doc): Updating the examples in the xxd manpage
closes: #15508 Signed-off-by: RestorerZ <restorer@mail2k.ru> Signed-off-by: Christian Brabandt <cb@256bit.org>
1 parent 85c724e commit 8f3f785

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

runtime/doc/xxd.1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ Patch the date in the file xxd.1
311311
.br
312312
\fI% xxd \-s 0x33 \-l 13 \-c 13 xxd.1\fR
313313
.br
314-
0000033: 3235 7468 204d 6179 2031 3939 36 25th May 1996
314+
00000033: 3235 7468 204d 6179 2031 3939 36 25th May 1996
315315
.PP
316316
.br
317317
Create a 65537 byte file with all bytes 0x00,
@@ -324,11 +324,11 @@ Hex dump this file with autoskip.
324324
.br
325325
\fI% xxd \-a \-c 12 file\fR
326326
.br
327-
0000000: 0000 0000 0000 0000 0000 0000 ............
327+
00000000: 0000 0000 0000 0000 0000 0000 ............
328328
.br
329329
*
330330
.br
331-
000fffc: 0000 0000 41 ....A
331+
0000fffc: 0000 0000 41 ....A
332332
.PP
333333
Create a 1 byte file containing a single 'A' character.
334334
The number after '\-r \-s' adds to the line numbers found in the file;

runtime/doc/xxd.man

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -206,25 +206,25 @@ EXAMPLES
206206

207207
Display just the date from the file xxd.1
208208
% xxd -s 0x33 -l 13 -c 13 xxd.1
209-
0000033: 3231 7374 204d 6179 2031 3939 36 21st May 1996
209+
00000033: 3231 7374 204d 6179 2031 3939 36 21st May 1996
210210

211211
Copy input_file to output_file and prepend 100 bytes of value 0x00.
212212
% xxd input_file | xxd -r -s 100 > output_file
213213

214214
Patch the date in the file xxd.1
215215
% echo "0000034: 3574 68" | xxd -r - xxd.1
216216
% xxd -s 0x33 -l 13 -c 13 xxd.1
217-
0000033: 3235 7468 204d 6179 2031 3939 36 25th May 1996
217+
00000033: 3235 7468 204d 6179 2031 3939 36 25th May 1996
218218

219219
Create a 65537 byte file with all bytes 0x00, except for the last one
220220
which is 'A' (hex 0x41).
221221
% echo "010000: 41" | xxd -r > file
222222

223223
Hex dump this file with autoskip.
224224
% xxd -a -c 12 file
225-
0000000: 0000 0000 0000 0000 0000 0000 ............
225+
00000000: 0000 0000 0000 0000 0000 0000 ............
226226
*
227-
000fffc: 0000 0000 41 ....A
227+
0000fffc: 0000 0000 41 ....A
228228

229229
Create a 1 byte file containing a single 'A' character. The number af‐
230230
ter '-r -s' adds to the line numbers found in the file; in effect, the

0 commit comments

Comments
 (0)