In this video, I show how sed can be used to replace newline characters in a file. Though sed is geared toward line-by-line replacement, there are a series of sed functions you can use to get it to load an entire file into the pattern space. This will enable you to replace occurrences of newlines.