On Sat, 20 May 2006, Joseph Alotta wrote: : : I have this text file I want to read that has ^M as the record separator (in : emacs). Is there a utility on the Mac that i can use to view this file in : hex. I thought i remember something like "hex filename", but it is not : there.
hexdump. Check the man page, it has several useful flags. I like -C: piltdown:~ alh$ hexdump -C testasm.s 00000000 2e 74 65 78 74 0a 2e 67 6c 6f 62 6c 20 5f 6d 61 |.text..globl _ma| 00000010 69 6e 0a 5f 6d 61 69 6e 3a 09 0a 09 70 75 73 68 |in._main:...push| 00000020 6c 09 24 30 78 30 30 0a 09 6d 6f 76 6c 09 25 65 |l.$0x00..movl.%e| etc... -- Make sure your code "does nothing" gracefully.