title: Using sed to search and replace an ip address in a file
body: <p>Been trying to get this working for a while and not really quite getting it.
  Basically, I have a file with an ip address that changes more or less on a daily basis. The file only contains one ip address and this is the one I'm trying to replace with my crazy grepping to find my current internal ip.</p>
  
  <p>I have this </p>
  
  <pre><code>#!/bin/sh
  
  newip=$(ifconfig | grep 0xfff | grep -Eo '([0-9]{1,3}\.){3}[0-9]{1,3}' | grep -v 255)
  
  echo $newip
  sed 's/*\.*\.*\.*/"$newip"/g' log.txt &gt; logmod.txt
  </code></pre>
  
  <p>but it's not matching and replacing.
  I'm not familiar with sed and I am a beginner with regexps too.</p>
  
  <p>Any help would be awesome!
  Thanks :)</p>