I am trying to use the sed command in a script. I need to make the command something like this:
sed -i 's,text-to-replace,variable-to-replace-it-with,g' file-to-do-this-in.txt
I have tried things like: sed -i 's,text,'$variable',g' file.txt and it says there is an incomplete 's' command. Can anybody help? Please ask for clarification if needed.