I am writing a shell script where I input a value and want to use the value for some other commands. My problem is that I want to escape this value.
For example, if I input
http://example.com in the following script
echo "Input a value for my_value"
It will result in
But the result I wish is
How do I achieve this?
The command I'm trying to run is
sed -i s/url/$my_value/g somefile.html
without the escape it becomes
sed -i s/url/http://example.com/g somefile.html which obviously is a syntax error..