title: How to convert DOS/Windows newline (CRLF) to Unix newline (LF)
body: <p>How can I programmatically (i.e., not using <a href="https://en.wikipedia.org/wiki/Vi" rel="noreferrer"><code>vi</code></a>) convert DOS/Windows newlines to Unix?</p>
  <p>The <code>dos2unix</code> and <code>unix2dos</code> commands are not available on certain systems. How can I emulate these with commands like <code>sed</code>, <code>awk</code>, and <code>tr</code>?</p>