title: sed creating ^M at end of line
body: <p>I have a script on a centos server and I wrote the script on the server using VIM. The script is to edit a configuration file. When I check the configuration file after it has been edited, there is a ^M at the end of every line that was NOT edited. The lines that were edited are fine.</p>
  
  <pre><code>        cat hibernate.properties | 
      sed -i.bk \
      -e 's%\(^hibernate\.connection\.url\=ristor:jdbc:postgresql:\/\/127\.0\.0\.1/\).*%\'1$dbname'%' \
      -e 's/\(^hibernate\.connection\.username\=\).*/\'1$dbuser'/' \
      -e 's/\(^hibernate\.connection\.password\=\).*/\'1$pws'/' hibernate.properties
  </code></pre>
  
  <p>This is the code that is being used to edit the configuration file. Why is it putting ^M at the end of every line that is NOT edited?</p>