From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@9fans.net Subject: Re: [9fans] xd bug From: "Russ Cox" Date: Mon, 14 Jul 2008 13:22:51 -0400 In-Reply-To: <66A41360-593C-4B12-B33E-04A9C7336CF1@mac.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Message-Id: <20080714172126.541A11E8C45@holo.morphisms.net> Topicbox-Message-UUID: e65c2e6c-ead3-11e9-9d60-3106f5b1d025 > If you look more closely at the alignment of the characters to the hex > values you will see that xd thinks Q has character code 0x525 and R > has character code 3. It should look more like > > % xd -c -x bad > 0000000 e0Q R S \n > 0 e0515253 0a000000 > 0000005 The -c and -x formats are not intended to align. If you want hex codes aligned with characters, use -b. % echo ABCD | xd -c -x 0000000 A B C D \n 0 41424344 0a000000 0000005 % Russ