title: Unix Shell - Removing special newline characters
body: <p>We are receiving a file that is delimited into rows with the \(newline) and columns with the \(tab) character. </p>
  
  <p>When there is a manual newline present in one of the "fields" of the file, it comes in as a special newline with two backslashes (\\newline).</p>
  
  <p>To remove the special tabs \(tab), we are using this sed command, which works correctly:</p>
  
  <pre><code>sed "s/$(printf '\\\\\t')/ /g"
  </code></pre>
  
  <p>The corresponding command for newlines, however does not:</p>
  
  <pre><code>sed "s/$(printf '\\\\\n')/ /g" 
  </code></pre>
  
  <p>It does not remove the \n, only the backslash before it. Is there special handling that needs to be done to remove \(newline)?</p>
  
  <p>Clarification: normal newlines are formatted like this:</p>
  
  <pre><code>\(newline)
  </code></pre>
  
  <p>Wheras the special characters that need removal are </p>
  
  <pre><code>\\(newline)
  </code></pre>