title: Sed command to replace a string which has a special character "&"
body: <p>Content of test.csv is:</p>
  
  <pre><code>XYZ,IN123
  </code></pre>
  
  <p>Here is my script:</p>
  
  <pre><code>Var1=IN123
  Var2=A&amp;B
  sed -i "s/$Var1/$Var2/g" test.csv
  </code></pre>
  
  <p>This is my simple code to replace the content of test.csv, when the code finds IN123, it will be replaced by A&amp;B. </p>
  
  <p>So expected output is:</p>
  
  <pre><code>XYZ,A&amp;B
  </code></pre>
  
  <p>But with the above code I am getting:</p>
  
  <pre><code>XYZ,AIN123B
  </code></pre>
  
  <p>What am I doing wrong?</p>