title: How to save a text file with noeol and in dos format using vi on a linux system
body: <p>I am running the IBAMR model (a set of codes for solving immersed boundary problems) on x86_64 GNU/Linux.
  The startup configuration file is called input2d.
  When I open it with vi, I find:</p>
  
  <p>"input2d" [noeol][dos] 251L, 11689C</p>
  
  <p>If I compile the IBAMR model without saving input2d, it compiles and runs fine.
  However, if I save input2d, the compiler crashes, saying:</p>
  
  <pre><code>Warning in input2d at line 251 column 5 : Illegal character token in input
  </code></pre>
  
  <p>Clearly this has something to do with unix adding a newline to the end of the file.
  Here's my question:
  How do I save this file in dos format AND without a trailing newline in vi on a unix system?</p>