title: Escaping dollar sign and curly brace in bash
body: <p>I'm making a script that needs to write ${somestring} to a file.
  The way I figured doing this was by escaping the dollar sign, but when it executes, the string ends up empty.</p>
  
  <p>Is there a way to escape this correctly?</p>
  
  <p>My code:</p>
  
  <pre><code># \$\{somestring\} works, but leaves the \'s which I don't want.
  myvar=("Yes I require multiple lines.
      Test \${somestring} test"); 
  
  echo "$myvar" &gt;&gt; "mytest.conf";
  </code></pre>