Replace new line in a particular field in unix
<p>I have a field in a file which has "\n" in between the value. I want to remove them. How can I do it?</p>

<p>For example, my 4th field may have one or more \n in them. I want to get rid of all of them.</p>

<pre><code>a|b|c|d\nD\n\n|e
a1|b1|c1|d1\n\nd2\n|e1
</code></pre>