title: TCSH Shell Script: substitute a variable using sed inside file
body: <p>in my tcsh script I have this</p>
  
  <pre><code>sed -i "s/^${y}$//g" $x
  </code></pre>
  
  <p>How do I get this to work? either I get no change or some error like Illegal Variable Name or Variable name must contain alphanumeric characters. Tried different combinations of "". '' within the sed . Example</p>
  
  <pre><code>sed 's/^'"${y}"'$//g' $x
  </code></pre>