title: sed: unterminated s command from bash script
body: <p>This exact code was working in another script. I copied the function over and now it keeps
  giving the unterminated 's' command error.</p>
  
  <pre><code>sed "
          s@&lt;%BRANCH-NAME%&gt;@${_loc_name}@g
          s@&lt;%BRANCH-ADDR%&gt;@${_loc_strt}@g
          s@&lt;%BRANCH-CTY%&gt;@${_loc_city}@g
          s@&lt;%CUST-NAME%&gt;@${_pat_name}@g
          s@&lt;%CUST-ADDR%&gt;@${_pat_addr}@
          s@&lt;%CUST-CTY%&gt;@${_pat_city}@
          s@&lt;%BARCODE%&gt;@${_barcode}@g
          s@&lt;%DATE%&gt;@${_date}@
          s@&lt;%TITLE%&gt;@${_title}@
          s@&lt;%AUTHOR%&gt;@${_auth}@
          s@&lt;%PRICE%&gt;@${_price}@" "$_template" 
  </code></pre>
  
  <p>In response to requests for possible values:</p>
  
  <p>These are huge files and this function is in a for loop. I use it to format forms for mailing. More info here: <a href="https://stackoverflow.com/questions/8764521/bash-importing-data-from-flat-file-into-template">BASH: importing data from flat file into template</a></p>
  
  <p>So this function worked for certain directories but I've hit a snag with this recent one.</p>
  
  <p>I grepped for slash characters on the advice of kev below ...none found except '/'. Possibly
  'silent' newlines.</p>
  
  <pre><code>find ./ -name "mail.TMP" -type f -exec grep -E '\n' {} \;
  </code></pre>
  
  <p>possible values would be things like: </p>
  
  <pre><code>${pat_name}
  </code></pre>
  
  <p>Hermann Hesse c/o His Mother</p>
  
  <pre><code>${loc_name}
  </code></pre>
  
  <p>Pandora SR home c/o Harmony City Hall</p>
  
  <p>So ...maybe it's a quoting issue?</p>