I'm trying to replace a string in a file using a script in linux.
After reading this post : Find and Replace Inside a Text File from a Bash Command
I used the following line
perl -pi -e "s/myparam/$MY_VAR/g" /res/raw/configuration.xml
But the problem is that MY_VAR
contains a url (something like https://stackoverflow.com/questions/ask), which contains /
and it doesn't replaces the string at all.
I assume i don't need to write a script that does find and replace to all the /
and there is a simple way to solve it.
Thanks