I understand I can use sed to find and replace data such as follows:
grep -r -l -e 'something1' /home/user/public_html/* | xargs sed -i 's/something1/something2/g'
But how do I replace string that contains forward slashes?
For example, how would I replace the following?
FIND: example.com/~user/
REPLACE: example.org/
grep -r -l -e 'something1' /home/user/public_html/* | xargs sed -i 's/something1/something2/g'
But how do I replace string that contains forward slashes?
For example, how would I replace the following?
FIND: example.com/~user/
REPLACE: example.org/
Last edited by a moderator: