title: Remove CR (\r) while reading text file
body: <p>I have this script where I'm reading a text file line by line and executing a command. I found that the strings (aka lines) always ends with <code>'\r'</code>.</p>
  
  <p>I wanna remove the CR from the end of the string.</p>
  
  <p>This is how my code looks like:</p>
  
  <pre><code>file="myfilelist.txt"
  
  while IFS= read -r filename
  do
  
  git log --oneline -- ${filename} |wc -l
  
  done &lt;"$file"
  </code></pre>
  
  <p>I wanna be able to perform the command in the loop without <code>\r</code> at the end of every line string (aka filename).</p>