title: sed with literal string--not input file
body: <p>This should be easy:  I want to run <strong>sed</strong> against a literal string, not an input file.  If you wonder why, it is to, for example edit values stored in variables, not necessarily text data.</p>
  
  <p>When I do:</p>
  
  <pre><code>sed 's/,/','/g' "A,B,C"
  </code></pre>
  
  <p>where A,B,C is the literal which I want to change to A','B','C</p>
  
  <p>I get </p>
  
  <pre><code>Can't open A,B,C
  </code></pre>
  
  <p>As though it thinks A,B,C is a file.</p>
  
  <p>I tried piping it to echo:</p>
  
  <pre><code>echo "A,B,C" | sed 's/,/','/g' 
  </code></pre>
  
  <p>I get a prompt.</p>
  
  <p>What is the right way to do it?</p>