title: Replace \n with \r\n in Unix file
body: <p>I'm trying to do the opposite of <a href="https://stackoverflow.com/questions/800030/remove-carriage-return-in-unix">this question</a>, replacing Unix line endings with Windows line endings, so that I can <a href="https://stackoverflow.com/questions/1494285/can-sql-server-bcp-in-a-file-with-unix-line-endings">use SQL Server bcp over samba to import the file</a>. I have <code>sed</code> installed but not <code>dos2unix</code>. I tried reversing the examples but to no avail.</p>
  
  <p>Here's the command I'm using.</p>
  
  <pre><code>sed -e 's/\n/\r\n/g' myfile
  </code></pre>
  
  <p>I executed this and then ran <code>od -c myfile</code>, expecting to see <code>\r\n</code> where there used to be <code>\n</code>. But there all still <code>\n</code>. (Or at least they appear to be. The output of od overflows my screen buffer, so I don't get to see the beginning of the file).</p>
  
  <p>I haven't been able to figure out what I'm doing wrong. Any suggestions?</p>