title: replace last character in a line with sed
body: <p>I am trying to replace the last character in a line with the same character plus a quotation mark <code>'</code></p>
  
  <p>This is the sed code</p>
  
  <pre><code> sed "s/\([A-Za-z]\)$/\1'/g" file1.txt &gt; file2.txt
  </code></pre>
  
  <p>but does not work. Where is the error?</p>