Crlf: Difference between revisions

From miki
Jump to navigation Jump to search
(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…')
 
No edit summary
Line 1: Line 1:
Everything about ascii file line termination issue (LF, CR/LF, CR...)
Everything about ascii file line termination issue (LF, CR/LF, CR...)

== Reference ==
* [http://vim.wikia.com/wiki/File_format File format in Vim]


== Detection ==
== Detection ==

Revision as of 08:43, 17 July 2011

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

Reference

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