title: Replacing string with variable in Jenkinsfile using SED command
body: <p>I have a Jenkinsfile in which I am fetching a value from AWS console ; and storing in a variable my_es_host , and there is a parameter in my <code>terraform.tfvars</code> file i.e. <code>es_host=""</code>. I am trying to insert the value of variable my_es_host in the terraform file. Below is the sed command I am using in the Jenkinsfile: </p>
  
  <pre><code>sh 'sed -i "s/es_host=\"\"/es_host=\"$my_es_host\"/g" terraform.tfvars
  </code></pre>
  
  <p>This is working as expected in Linux terminal. However, this sed command does not work in a Jenkinsfile. Can someone help me on this please ?</p>