Unix text file marks the end of the line with newline character ('\n').
DOS text file has a two-character sequence, carriage return and newline ('\r\n') at the end of the line.
For example Unix text file
1st row
2nd row
would be stored as a character sequence
1st row\n 2nd row\n
Text tools (like vi and awk) handle automaticaly with end-of-line character (abbr. EOL).
To replace EOL you can:
(1) join two lines, for example (see Unix text file example)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.