Bash Concatenate and Replace carriage returns with newline
<p>I need to convert a series of text files that are formatted with line breaks to single lines separated by newlines (\n). For example:</p>

<pre class="lang-none prettyprint-override"><code>This is an example text file 
where the contents are separated 
by line breaks
</code></pre>

<p>What I want this to look like is:</p>

<pre class="lang-none prettyprint-override"><code>This is an example text file\nwhere the contents are separated\nby line breaks\n
</code></pre>

<p>I'm open to using awk, sed, or any builtin POSIX commands.</p>