Using Vi
- Open the file in Vi editor
- Switch to command mode.
- To replace all newline characters with comma use
:1,$s/\n/, /g
- Press Enter
Using NotePad++
- Open a NotePad++ window.
- Insert Find and Replace mode.
- Within the Find What field, enter the following:
\r\n
- Within the Replace with field, enter a comma.