title: Bash alias file corrupted: No such file or directory
body: <p>I have/had <code>~/.bashrc_aliases.sh</code> (a file containing bash aliases) sourced by my <code>~/.bashrc</code> file. This <code>~/.bashrc_aliases.sh</code> file somehow happened to be in DOS format which I fixed by running <code>dos2unix</code> on the file.</p>
  <p>When this alias file was in 'DOS' format, whenever I typed the <code>alias</code> command in Bash, the <code>alias</code> lines were starting with the <code>'</code> character instead of <code>a</code>, and the aliases wouldn't really work, so I got stuff like:</p>
  <blockquote>
  <p>&quot;: No such file or directory&quot;, &quot;'s: invalid option -- '&quot;</p>
  </blockquote>
  <p>etc.</p>
  <p>What was going on when the file was in DOS format? Why was the <code>alias</code> command returning lines starting with the <code>'</code> character? Why was I getting the above error?</p>
  <hr />
  <blockquote>
  <p>marked as duplicate by kenorb, tripleee bash</p>
  <p>This question has been asked before and already has an answer. If those answers do not fully address your question, please edit this question to explain how it is different or ask a new question.</p>
  </blockquote>
  <p>The question linked to was asking how to fix the problem. While this question was asking for an explanation as to what was happening during the problem, not how to fix it.</p>