title: Carriage return in unix scripting
body: <p>I have a file like this</p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
          ServerAdmin webmaster@localhost
  
          DocumentRoot /var/www/
          &lt;Directory /&gt;
                  Options FollowSymLinks
                  AllowOverride None
          &lt;/Directory&gt;
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>I would like to achieve this:</p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
          ServerAdmin info@domain.com
          ServerName domain.com
          ServerAlias www.domain.com
  
          DocumentRoot /var/www/
          &lt;Directory /&gt;
                  Options FollowSymLinks
                  AllowOverride None
          &lt;/Directory&gt;
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>I tired this but the line carriage doesn't work properly.
  I even tried \r\n without luck.  </p>
  
  <pre><code>sudo sed -i "s/webmaster@localhost/info@domain.com\rServerName domain.com \rServerAlias www.domain.com/" /etc/apache2/sites-available/domain
  </code></pre>
  
  <p>I get this weird character there between:</p>
  
  <pre><code>&lt;VirtualHost _default_:443&gt;
          ServerAdmin info@domain.com ^MServerName domain.com ^MServerAlias www.domain.com
  
          DocumentRoot /var/www/
          &lt;Directory /&gt;
                  Options FollowSymLinks
                  AllowOverride None
          &lt;/Directory&gt;
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>What am I missing? </p>
  
  <p>Many Thanks,</p>