title: 'sed' is not replacing matching sequence in file
body: <p>I have input like this in a specific file</p>
  
  <pre><code>#- seeds: "12.123.233.213,123.231.3.2"
      - seeds: "12.12.21.21,43.435.54.54"
  </code></pre>
  
  <p>As you see that the seeds contains two consecutive IP addresses, so I want to change that IP address in the file. 1st line will not be considered as it starts with "#"</p>
  
  <p>So for doing this, I have this:</p>
  
  <pre><code>val=' - seeds: "'
  
  newSeed=${val}${ip1}','${ip2}'"'     # ---&gt; I'm creating the new seed
  str=`grep "\s- seed" $file`          # ---&gt; finding matching character
  echo $str                            # ---&gt; it does print out the 2nd line
  sed -i 's|${str}|${newSeed}|g' $file # --&gt; now replace the matched string with new seed value
  </code></pre>
  
  <p>But it doesn't replace the value in the file. What I'm doing wrong here? </p>