title: (sed beginner) replace characters in an env variable
body: <p>How can I replace caracters "on the fly" when using sed ?
  Example :</p>
  
  <p>I want this command to be executed :
      /bin/sed 's/HOSTNAME=.*/HOSTNAME=<strong>server_domain_com</strong>/g' /etc/sysconfig/network</p>
  
  <p>Instead of this one :
      /bin/sed 's/HOSTNAME=.*/HOSTNAME=<strong>server.domain.com</strong>/g' /etc/sysconfig/network</p>
  
  <p>the string "server.domain.com" is contained in a env variable and I would like to replace the dots by an underscore before replacing the appropriate line in /etc/sysconfig/network.</p>
  
  <p>Thank you!</p>