title: sed unterminated 's' command
body: <p>I have the below sed command:</p>
  
  <pre><code>Ctimezone="$shortName = exec('date +%Z');\
    $longName = timezone_name_from_abbr($shortName);\
    date_default_timezone_set($longName);"
  
  sed -i 10s@.*@$Ctimezone@ /home/file.php
  </code></pre>
  
  <p>However this gives me the error:</p>
  
  <pre><code>sed -e expression #1, char 7: unterminated 's' command
  </code></pre>
  
  <p>My understanding of sed is not great so im sure its an easy fix but couldn't work it out myself.</p>
  
  <p>If you need any more info let me know</p>
  
  <p>Changed to:</p>
  
  <pre><code>sed -i "10s@.*@$Ctimezone@" /home/file.php
  </code></pre>
  
  <p>but what is put into file.php is:</p>
  
  <blockquote>
    <p>= exec('date +%Z'); = timezone_name_from_abbr(); date_default_timezone_set();</p>
  </blockquote>
  
  <p>not </p>
  
  <blockquote>
    <p>$shortName = exec('date +%Z'); $longName = timezone_name_from_abbr($shortName); date_default_timezone_set($longName);</p>
  </blockquote>