About line terminators (CR, LF)

 

CR (Carriage Return) means carriage return
LF (Line Feed) means line feed

 

Dos and Windows use carriage return + line feed (CR+LF) to indicate the next line
, while UNIX/Linux uses line feed (LF) to indicate the next line.
Macintosh (MAC OS) uses carriage return (CR) to indicate the next line.

 

Shell scripts written under Windows will report an error if they are directly executed under linux/unix, because the line terminators are different.

 

Many text tools now provide conversion functions, such as notepad2:

 

 

 


 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326862526&siteId=291194637