Use the od command to dump a file to the console as binary (ascii-hex). This even works on the MAC. It's useful when you're having problems with control characters like line endings.
$ od -t x1 test1.sh
0000000 23 21 2f 62 69 6e 2f 6b 73 68 20 2d 65 70 75 0a
0000020 0a 65 63 68 6f 20 22 46 69 6e 69 73 68 65 64 21
0000040 22 0a 0a
0000043
$ od -t x1 test2.sh
0000000 23 21 2f 62 69 6e 2f 6b 73 68 20 2d 65 70 75 0d
0000020 0a 0d 0a 65 63 68 6f 20 22 46 69 6e 69 73 68 65
0000040 64 21 22 0d 0a
0000045
Friday, May 20, 2011
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment