richardii, hello!
A few words about end-of-line character
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)
awk code:
{ line = line $0; print line }
result:
1 st row
1 st row 2nd row
(2) add character after EOL-character
awk code:
{ print $0 "X" }
result:
1 st rowX
2nd rowX
I hope this helps.
Bye!
KP.