diff options
Diffstat (limited to 'runtime/doc/xxd.man')
-rw-r--r-- | runtime/doc/xxd.man | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/runtime/doc/xxd.man b/runtime/doc/xxd.man index 894dfea35..935751c80 100644 --- a/runtime/doc/xxd.man +++ b/runtime/doc/xxd.man @@ -130,16 +130,16 @@ CAVEATS Rewind stdin before reading; needed because the `cat' has already read to the end of stdin. - % sh -c 'cat > plain_copy; xxd -s 0 > hex_copy' < file + % sh -c "cat > plain_copy; xxd -s 0 > hex_copy" < file Hexdump from file position 0x480 (=1024+128) onwards. The `+' sign means "relative to the current position", thus the `128' adds to the 1k where dd left off. - % sh -c 'dd of=plain_snippet bs=1k count=1; xxd -s +128 > hex_snippet' + % sh -c "dd of=plain_snippet bs=1k count=1; xxd -s +128 > hex_snippet" < file Hexdump from file position 0x100 ( = 1024-768) on. - % sh -c 'dd of=plain_snippet bs=1k count=1; xxd -s +-768 > hex_snippet' + % sh -c "dd of=plain_snippet bs=1k count=1; xxd -s +-768 > hex_snippet" < file However, this is a rare situation and the use of `+' is rarely needed. @@ -147,10 +147,10 @@ CAVEATS truss(1), whenever -s is used. EXAMPLES - Print everything but the first three lines (hex 0x30 bytes) of file + Print everything but the first three lines (hex 0x30 bytes) of file. % xxd -s 0x30 file - Print 3 lines (hex 0x30 bytes) from the end of file + Print 3 lines (hex 0x30 bytes) from the end of file. % xxd -s -0x30 file Print 120 bytes as continuous hexdump with 40 octets per line. @@ -183,13 +183,13 @@ EXAMPLES % xxd input_file | xxd -r -s 100 > output_file Patch the date in the file xxd.1 - % echo '0000037: 3574 68' | xxd -r - xxd.1 + % echo "0000037: 3574 68" | xxd -r - xxd.1 % xxd -s 0x36 -l 13 -c 13 xxd.1 0000036: 3235 7468 204d 6179 2031 3939 36 25th May 1996 Create a 65537 byte file with all bytes 0x00, except for the last one which is 'A' (hex 0x41). - % echo '010000: 41' | xxd -r > file + % echo "010000: 41" | xxd -r > file Hexdump this file with autoskip. % xxd -a -c 12 file @@ -200,7 +200,7 @@ EXAMPLES Create a 1 byte file containing a single 'A' character. The number after '-r -s' adds to the linenumbers found in the file; in effect, the leading bytes are suppressed. - % echo '010000: 41' | xxd -r -s -0x10000 > file + % echo "010000: 41" | xxd -r -s -0x10000 > file Use xxd as a filter within an editor such as vim(1) to hexdump a region marked between `a' and `z'. |