Create an ascii hexdump from binary or text files, to take a look into format details like line endings, with sfk hexdump for Windows, Mac OS X and Linux.

sfk hexdump [-showle] [-wide] [...] dir .ext1 .ext2 .ext3

create human-readable hexdump of binary file(s).

options
   -showle  highlights line ending characters CR and LF.
            you may also add "le" to the command name.
   -wide    dumps 32 input bytes per line.
   -lean    dumps 16 input bytes per line.
   -post    reduced format e.g. for forum posts
   -min     minimal format with alnum only text
   -nofile  or -nofilenames does not list the filename(s).
   -rawname prints filename without :file prefix
   -pure    lists flat hex characters:
            53464B2D544553540D0A
   -hexsrc  lists hex comma separated values:
            0x53,0x46,0x4B,0x2D,0x54,0x45,0x53,0x54,0x0D,0x0A,
   -decsrc  lists decimal comma separated values:
            83,70,75,45,84,69,83,84,13,10,
   -off[set] n1    dump from offset n1 to file end.
                   n1 can be negative, for example
                   -off=-100 dumps last 100 bytes of file.
   -last n1        same as -offset -n1
   -offlen n1 n2   dump from offset n1 only n2 bytes.
   -notrail     no trailing comma "," at end of hex/dec src
   -norectrail  no trailing comma at end of every src record
   -recsize n   only with -hex/decsrc, -pure or -flat:
            change no. of input bytes dumped per record.
            with default output format, use -wide instead.

  aliases
 sfk hexdumple - same as "sfk hexdump -showle" for text
 sfk postdump  - same as "sfk hexdump -post" for forums

  see also
 sfk hextobin  - convert hex dump back to original data.

web reference
   http://stahlworks.com/sfk-hexdump

  examples
 sfk hexdump -offlen 4221566976 96 part1.avi
     dumps 96 bytes from offset 4221566976 within part1.avi

 sfk hexdump -offlen 0xFBA00000 0x60 part1.avi
     the same as above, but using hexadecimal numbers

 sfk postdump test.dat +toclip
     put test.dat contents into clipboard for posting
 
example:

   check if a script file contains just UNIX LF line endings,
   or DOS CR/LF format:

   sfk hexdump -showle thescript.bat

   >6364202E 2E0A726D 202D7266 20746D70< cd ...rm -rf tmp 00000000
   >2D73656C 66746573 740A6D6B 64697220< -selftest.mkdir  00000010
   >746D702D 73656C66 74657374 0A636420< tmp-selftest.cd  00000020
   >746D702D 73656C66 74657374 0A637020< tmp-selftest.cp  00000030
   >2D52202E 2E2F7465 73746669 6C657320< -R ../testfiles  00000040
   >74657374 66696C65 730A0A65 78706F72< testfiles..expor 00000050
   >74205443 4D443D22 636D7020 2E2E2F73< t TCMD="cmp ../s 00000060
   >63726970 74732F31 302D7366 6B2D7365< cripts/10-sfk-se 00000070
   >6C667465 73742D64 622E7478 74220A0A< lftest-db.txt".. 00000080
   >2E202E2E 2F736372 69707473 2F31322D< . ../scripts/12- 00000090
   >7375622D 74657374 2D75782E 6261740A< sub-test-ux.bat. 000000a0
   >0A636420 2E2E2F73 63726970 74730A<   .cd ../scripts.  000000b0

   the result shows that the script is in UNIX format (just LF 0x0A,
   no CR/LF 0x0D0A).
     
see also:

   sfk hextobin   - converting hex text to binary.