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
myfile.txt
Try
sed -e "s/^MYVERSION=/MYVERSION=.*$/&${VERSION}/g" < myfile.txt
The command appends the value of VERSION to the line with 'MYVERSION='