title: sed/awk - add www. only if URL lacks www
body: <p>How to check if exists www in text? if not - add www, but if exists don't touch</p>
  
  <p>For example</p>
  
  <pre><code>google.com
  www.google.com
  www.maps.google.com
  test.test.test.com
  </code></pre>
  
  <p>Output should be</p>
  
  <pre><code>www.google.com
  www.google.com
  www.maps.google.com
  www.test.test.test.com
  </code></pre>
  
  <p>I find some like this:</p>
  
  <pre><code>awk -F. '{print "www." $0; next}; {print}'
  </code></pre>
  
  <p>But this add always www</p>