title: Jenkins, how to add variable content to file
body: <p>How can I add variable content in file? </p>
  
  <pre><code>sh "ssh root@${host} 'echo '$vari' &gt; text.txt'"
  </code></pre>
  
  <p>This gives empty file</p>
  
  <p>Without variable it works:</p>
  
  <pre><code>sh "ssh root@${host} 'echo some text &gt; text.txt'"
  </code></pre>