-.TH XXD 1 "March 2026" "Manual page for xxd"
+.TH XXD 1 "Mar 2026" "Manual page for xxd"
.\"
.\" 21st May 1996
.\" Man page author:
.PP
Output in C style include output with terminating zero
.br
-\fI% echo -e \&"0123456789\&" > digits\fR
+\fI% echo -n \&"0123456789\&" > digits\fR
.br
\fI% xxd -i -t digits\fR
.br
unsigned char digits[] = {
.br
- 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x0a, 0x00
+ 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x00
.br
};
.br
-unsigned int digits_len = 11;
+unsigned int digits_len = 10;
.PP
.SH "RETURN VALUES"
The following error values are returned:
% echo -n foo > /dev/term/b
Output in C style include output with terminating zero
- % echo -e "0123456789" > digits
+ % echo -n "0123456789" > digits
% xxd -i -t digits
unsigned char digits[] = {
- 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x0a,
- 0x00
+ 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x00
};
- unsigned int digits_len = 11;
+ unsigned int digits_len = 10;
RETURN VALUES
The following error values are returned:
<tony@sctnugen.ppp.gu.edu.au> <T.Nugent@sct.gu.edu.au>
Small changes by Bram Moolenaar. Edited by Juergen Weigert.
-Manual page for xxd March 2026 XXD(1)
+Manual page for xxd Mar 2026 XXD(1)
exe '0r ' man_page '| set ff=unix | $d | w' man_copy '| bwipe!' man_copy
" Test 5: Print 120 bytes as continuous hexdump with 20 octets per line
+ " skip the first 30 bytes, it contains the date of the manpage
+ " which can change
let s:test += 1
%d
- exe '0r! ' . s:xxd_cmd . ' -l 120 -ps -c20 ' . man_copy
+ exe '0r! ' . s:xxd_cmd . ' -s 30 -l 120 -ps -c20 ' . man_copy
$d
let expected = [
- \ '2e544820585844203120224d6179203230323422',
- \ '20224d616e75616c207061676520666f72207878',
- \ '64220a2e5c220a2e5c222032317374204d617920',
- \ '313939360a2e5c22204d616e2070616765206175',
- \ '74686f723a0a2e5c2220202020546f6e79204e75',
- \ '67656e74203c746f6e79407363746e7567656e2e']
+ \ '61676520666f7220787864220a2e5c220a2e5c22',
+ \ '2032317374204d617920313939360a2e5c22204d',
+ \ '616e207061676520617574686f723a0a2e5c2220',
+ \ '202020546f6e79204e7567656e74203c746f6e79',
+ \ '407363746e7567656e2e7070702e67752e656475',
+ \ '2e61753e203c542e4e7567656e74407363742e67']
call assert_equal(expected, getline(1,'$'), s:Mess(s:test))
" Test 6: Print the date from xxd.1
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 210,
/**/
209,
/**/