title: Bash script: Appending text at the last character of specific line of a file
body: <p>I am trying to append a variable at the last character of a specific line of a file from a bash script.</p>
  
  <p>The file is called <code>myfile.txt</code> and what I want to do is to append the contents of a variable named <code>VERSION</code> right after the last character of the line of the file that contains the unique string <code>MYVERSION</code>.</p>
  
  <p>That is, if in this line there is the following:</p>
  
  <pre><code>MYVERSION=0.1
  </code></pre>
  
  <p>and <code>VERSION="-custom_P1"</code> then, I want to have the following:</p>
  
  <pre><code>MYVERSION=0.1-custom_P1
  </code></pre>
  
  <p>Thank you all for the help.</p>