How to Insert a Newline Character in SED
- 1). Open a terminal window.
- 2). Type the first part of the command "sed 's:a:A\." Then press the "Enter" key. Finish the command on the next line with ":'<old_file >new_file" to replace all instances of the lowercase "a" with uppercase "A" followed by a newline.
- 3). Type the command "cat new_file" to view the changes.
Source...