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