Crlf

From miki
Revision as of 11:44, 15 July 2011 by Mip (talk | contribs) (Created page with 'Everything about ascii file line termination issue (LF, CR/LF, CR...) == Detection == * Hex dump <source lang=bash> hd <file> # 00000000 48 65 6c 6c 6f 0d 0a 48 65 6c 6c 6f 0d…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Everything about ascii file line termination issue (LF, CR/LF, CR...)

Detection

  • Hex dump
hd <file>
# 00000000  48 65 6c 6c 6f 0d 0a 48  65 6c 6c 6f 0d 0a 48 65  |Hello..Hello..He|
# 00000010  6c 6c 6f 0d 0a 48 65 6c  6c 6f 0d 0a              |llo..Hello..|
# 0000001c
  • Use file:
file crlf.txt cr_and_lf.txt lf.txt
# crlf.txt:       ASCII text, with CRLF line terminators
# cr_and_lf.txt:  ASCII text, with CRLF, LF line terminators
lf# .txt:         ASCII text