'sed command not working, how to fix this?

echo $rpmdownload
curl --location --output pipeline.rpm --header "JOB-TOKEN: [MASKED]" "https://myproject.gitlab.io/-/myproject/-/jobs//artifacts/raw/dist/myproject-n-dev-default-nightlye2e.x86_64.rpm"
vagrant@vagrant:~/aws/admin-server$ cat i.txt
yum -y update
yum update -y
vagrant@vagrant:~/aws/admin-server$ sed -i "s/yum -y update/${rpmdownload}; yum -y update/g" i.txt
sed: -e expression #1, char 86: unknown option to `s'

For simple strings, it is working. But for the above string, getting error as in last line.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source