title: How find ip in a line and replace it with bash script?
body: <p>I have a file like this</p>
  
  <pre><code>www       IN       A       192.168.10.1
  webmail   IN       A       192.168.10.2
  mail      IN       A       192.168.10.3
  </code></pre>
  
  <p>I want to write a bash script that get 3 input like this</p>
  
  <pre><code>./script.sh network.com www 192.168.10.10
  </code></pre>
  
  <p>and script is</p>
  
  <pre><code>project=$1
  server=$2
  ip=$3
  h=$(awk -F "$server       IN       A" '{print $2}' /home/forward.$project)
  sed -i "s/$h/$ip/"
  </code></pre>
  
  <p>I want to find line that start with second input and replace (ip) with third input but my script doesn't work.</p>