title: How can I replace each newline (\n) with a space using sed?
body: <p>How can I replace a newline ("<code>\n</code>") with a space ("<code></code>") using the <code>sed</code> command?</p>
  
  <p>I unsuccessfully tried:    </p>
  
  <pre><code>sed 's#\n# #g' file
  sed 's#^$# #g' file
  </code></pre>
  
  <p>How do I fix it?</p>